mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/asset/TestAssetImpl.java
@Test
    public void testInitialStatus() throws Exception
    {
        // verify persisted
        ArgumentCaptor<Observation> observationCap = ArgumentCaptor.forClass(Observation.class);
        verify(m_ObservationStore).persist(observationCap.capture());

        // make sure observation is stored as last status
        assertThat(m_SUT.getLastStatus(), is(observationCap.getValue()));

        // verify base fields are set
        assertThat(observationCap.getValue().getAssetName(), is(m_SUT.getName()));
        assertThat(observationCap.getValue().getAssetUuid(), is(m_SUT.getUuid()));
        assertThat(observationCap.getValue().getSystemId(), is(m_Controller.getId()));
    }
/**
     * Verify the initial status is set correctly and sent to the context for persistence.
     */
Verify the initial status is set correctly and sent to the context for persistence.
Verify the initial status is set correctly and sent to the context for persistence .
@Test
    public void testInitialStatus() throws Exception
    {
        ArgumentCaptor<Observation> observationCap = ArgumentCaptor.forClass(Observation.class);
        verify(m_ObservationStore).persist(observationCap.capture());
        assertThat(m_SUT.getLastStatus(), is(observationCap.getValue()));
        assertThat(observationCap.getValue().getAssetName(), is(m_SUT.getName()));
        assertThat(observationCap.getValue().getAssetUuid(), is(m_SUT.getUuid()));
        assertThat(observationCap.getValue().getSystemId(), is(m_Controller.getId()));
    }
@ Test public void testInitialStatus ( ) throws Exception { ArgumentCaptor < Observation > observationCap = ArgumentCaptor . forClass ( Observation . class ) ; verify ( m_ObservationStore ) . persist ( observationCap . capture ( ) ) ; assertThat ( m_SUT . getLastStatus ( ) , is ( observationCap . getValue ( ) ) ) ; assertThat ( observationCap . getValue ( ) . getAssetName ( ) , is ( m_SUT . getName ( ) ) ) ; assertThat ( observationCap . getValue ( ) . getAssetUuid ( ) , is ( m_SUT . getUuid ( ) ) ) ; assertThat ( observationCap . getValue ( ) . getSystemId ( ) , is ( m_Controller . getId ( ) ) ) ; }
Verify the initial status is set correctly and sent to the context for persistence.
Verify the initial status is set correctly and sent to the context for persistence .
// verify persisted // make sure observation is stored as last status // verify base fields are set