mil.dod.th.ose.integration/src/mil/dod/th/ose/controller/integration/core/TestPersistedObservations.java
@Test
    public void testObservationRestored()
    {
        ObservationStore observationStore = IntegrationTestRunner.getService(ObservationStore.class);
        assertThat(observationStore, is(notNullValue()));
        
        Observation expectedObs = ObservationHelper.createBasicObservation();
        Observation persistedObs = observationStore.find(expectedObs.getUuid());

        //verify that the system mode was persisted
        assertThat(persistedObs.isSystemInTestMode(), is(true));
        
        //the version field 
        Version version = persistedObs.getVersion();
        assertThat(version.getMajorNumber(), is(1));
        assertThat(version.getMinorNumber(), is(2));
        
        //reserved fields
        List<MapEntry> reserved = persistedObs.getReserved();
        assertThat(reserved.get(0).getKey(), is("String"));
        assertThat(reserved.get(0).getValue(), is((Object)"Bob"));
        assertThat(reserved.get(1).getKey(), is("Double"));
        assertThat(reserved.get(1).getValue(), is((Object)2.25));
        assertThat(reserved.get(2).getKey(), is("Integer"));
        assertThat(reserved.get(2).getValue(), is((Object)100));
        assertThat(reserved.get(3).getKey(), is("Boolean"));
        assertThat(reserved.get(3).getValue(), is((Object)true));
        assertThat(reserved.get(4).getKey(), is("Long"));
        assertThat(reserved.get(4).getValue(), is((Object)12345L));
    }
/**
     * Verify system mode and version attributes are properly stored in the observation store.
     */
Verify system mode and version attributes are properly stored in the observation store.
Verify system mode and version attributes are properly stored in the observation store .
@Test
    public void testObservationRestored()
    {
        ObservationStore observationStore = IntegrationTestRunner.getService(ObservationStore.class);
        assertThat(observationStore, is(notNullValue()));
        Observation expectedObs = ObservationHelper.createBasicObservation();
        Observation persistedObs = observationStore.find(expectedObs.getUuid());
        assertThat(persistedObs.isSystemInTestMode(), is(true));
        Version version = persistedObs.getVersion();
        assertThat(version.getMajorNumber(), is(1));
        assertThat(version.getMinorNumber(), is(2));
        List<MapEntry> reserved = persistedObs.getReserved();
        assertThat(reserved.get(0).getKey(), is("String"));
        assertThat(reserved.get(0).getValue(), is((Object)"Bob"));
        assertThat(reserved.get(1).getKey(), is("Double"));
        assertThat(reserved.get(1).getValue(), is((Object)2.25));
        assertThat(reserved.get(2).getKey(), is("Integer"));
        assertThat(reserved.get(2).getValue(), is((Object)100));
        assertThat(reserved.get(3).getKey(), is("Boolean"));
        assertThat(reserved.get(3).getValue(), is((Object)true));
        assertThat(reserved.get(4).getKey(), is("Long"));
        assertThat(reserved.get(4).getValue(), is((Object)12345L));
    }
@ Test public void testObservationRestored ( ) { ObservationStore observationStore = IntegrationTestRunner . getService ( ObservationStore . class ) ; assertThat ( observationStore , is ( notNullValue ( ) ) ) ; Observation expectedObs = ObservationHelper . createBasicObservation ( ) ; Observation persistedObs = observationStore . find ( expectedObs . getUuid ( ) ) ; assertThat ( persistedObs . isSystemInTestMode ( ) , is ( true ) ) ; Version version = persistedObs . getVersion ( ) ; assertThat ( version . getMajorNumber ( ) , is ( 1 ) ) ; assertThat ( version . getMinorNumber ( ) , is ( 2 ) ) ; List < MapEntry > reserved = persistedObs . getReserved ( ) ; assertThat ( reserved . get ( 0 ) . getKey ( ) , is ( "String" ) ) ; assertThat ( reserved . get ( 0 ) . getValue ( ) , is ( ( Object ) "Bob" ) ) ; assertThat ( reserved . get ( 1 ) . getKey ( ) , is ( "Double" ) ) ; assertThat ( reserved . get ( 1 ) . getValue ( ) , is ( ( Object ) 2.25 ) ) ; assertThat ( reserved . get ( 2 ) . getKey ( ) , is ( "Integer" ) ) ; assertThat ( reserved . get ( 2 ) . getValue ( ) , is ( ( Object ) 100 ) ) ; assertThat ( reserved . get ( 3 ) . getKey ( ) , is ( "Boolean" ) ) ; assertThat ( reserved . get ( 3 ) . getValue ( ) , is ( ( Object ) true ) ) ; assertThat ( reserved . get ( 4 ) . getKey ( ) , is ( "Long" ) ) ; assertThat ( reserved . get ( 4 ) . getValue ( ) , is ( ( Object ) 12345L ) ) ; }
Verify system mode and version attributes are properly stored in the observation store.
Verify system mode and version attributes are properly stored in the observation store .
//verify that the system mode was persisted //the version field  //reserved fields