mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/asset/TestAssetImpl.java
@Test
    public void testPersistObservation() throws PersistenceFailedException, ValidationFailedException
    {
        Observation observation = new Observation();
        m_SUT.persistObservation(observation);

        ArgumentCaptor<Observation> obsCapt = ArgumentCaptor.forClass(Observation.class);
        verify(m_ObservationStore, atLeastOnce()).persist(obsCapt.capture());

        Observation persistedObservation = obsCapt.getValue();
        assertThat(persistedObservation.getAssetName(), is(OBJ_NAME));
        assertThat(persistedObservation.getAssetUuid(), is(OBJ_UUID));
        assertThat(persistedObservation.getSystemId(), is(m_Controller.getId()));
        assertThat(persistedObservation.getVersion(), is(m_ObservationStore.getObservationVersion()));
        assertThat(persistedObservation.isSystemInTestMode(), is(true));
        assertThat(persistedObservation.getUuid(), notNullValue());
        assertThat(persistedObservation.isSetObservedTimestamp(), is(false));
        assertThat(persistedObservation.isSetCreatedTimestamp(), is(true));
        assertThat(persistedObservation.getAssetType(), is(PRODUCT_TYPE));

        verifyCoordsWithEllipse(persistedObservation.getAssetLocation(), 100d, 10d, 5d, 1d, 2d, 90d);
        verifyOrientation(persistedObservation.getAssetOrientation(), 100d, 90d, 45d);
    }
/**
     * Verify that a persisted observation is saved correctly.
     */
Verify that a persisted observation is saved correctly.
Verify that a persisted observation is saved correctly .
@Test
    public void testPersistObservation() throws PersistenceFailedException, ValidationFailedException
    {
        Observation observation = new Observation();
        m_SUT.persistObservation(observation);
        ArgumentCaptor<Observation> obsCapt = ArgumentCaptor.forClass(Observation.class);
        verify(m_ObservationStore, atLeastOnce()).persist(obsCapt.capture());
        Observation persistedObservation = obsCapt.getValue();
        assertThat(persistedObservation.getAssetName(), is(OBJ_NAME));
        assertThat(persistedObservation.getAssetUuid(), is(OBJ_UUID));
        assertThat(persistedObservation.getSystemId(), is(m_Controller.getId()));
        assertThat(persistedObservation.getVersion(), is(m_ObservationStore.getObservationVersion()));
        assertThat(persistedObservation.isSystemInTestMode(), is(true));
        assertThat(persistedObservation.getUuid(), notNullValue());
        assertThat(persistedObservation.isSetObservedTimestamp(), is(false));
        assertThat(persistedObservation.isSetCreatedTimestamp(), is(true));
        assertThat(persistedObservation.getAssetType(), is(PRODUCT_TYPE));
        verifyCoordsWithEllipse(persistedObservation.getAssetLocation(), 100d, 10d, 5d, 1d, 2d, 90d);
        verifyOrientation(persistedObservation.getAssetOrientation(), 100d, 90d, 45d);
    }
@ Test public void testPersistObservation ( ) throws PersistenceFailedException , ValidationFailedException { Observation observation = new Observation ( ) ; m_SUT . persistObservation ( observation ) ; ArgumentCaptor < Observation > obsCapt = ArgumentCaptor . forClass ( Observation . class ) ; verify ( m_ObservationStore , atLeastOnce ( ) ) . persist ( obsCapt . capture ( ) ) ; Observation persistedObservation = obsCapt . getValue ( ) ; assertThat ( persistedObservation . getAssetName ( ) , is ( OBJ_NAME ) ) ; assertThat ( persistedObservation . getAssetUuid ( ) , is ( OBJ_UUID ) ) ; assertThat ( persistedObservation . getSystemId ( ) , is ( m_Controller . getId ( ) ) ) ; assertThat ( persistedObservation . getVersion ( ) , is ( m_ObservationStore . getObservationVersion ( ) ) ) ; assertThat ( persistedObservation . isSystemInTestMode ( ) , is ( true ) ) ; assertThat ( persistedObservation . getUuid ( ) , notNullValue ( ) ) ; assertThat ( persistedObservation . isSetObservedTimestamp ( ) , is ( false ) ) ; assertThat ( persistedObservation . isSetCreatedTimestamp ( ) , is ( true ) ) ; assertThat ( persistedObservation . getAssetType ( ) , is ( PRODUCT_TYPE ) ) ; verifyCoordsWithEllipse ( persistedObservation . getAssetLocation ( ) , 100d , 10d , 5d , 1d , 2d , 90d ) ; verifyOrientation ( persistedObservation . getAssetOrientation ( ) , 100d , 90d , 45d ) ; }
Verify that a persisted observation is saved correctly.
Verify that a persisted observation is saved correctly .