mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/observation/TestObservationMgrImpl.java
@Test
    public void testGetObservation()
    {
        UUID obsUuid = UUID.randomUUID();
        Observation mockedObs = createMockedObservation(obsUuid, 1000, true, ObservationSubTypeEnum.CBRNE_TRIGGER, 
                ObservationSubTypeEnum.STATUS);

        when(m_ObservationStore.find(obsUuid)).thenReturn(mockedObs);
        
        GuiObservation guiObs = m_SUT.getObservation(obsUuid);
        assertThat(guiObs.getObservation().getUuid(), is(obsUuid));
        assertThat(guiObs.getObservation().getCreatedTimestamp(), is(1000L));
        assertThat(guiObs.getRelatedObservationModels().get(0)
            .getObservationSubType(), is(ObservationSubTypeEnum.CBRNE_TRIGGER));
        assertThat(guiObs.getRelatedObservationModels().get(1).getObservationSubType(), 
                is(ObservationSubTypeEnum.STATUS));
    }
/**
     * Verify that the get observation method returns the appropriate gui observation.
     */
Verify that the get observation method returns the appropriate gui observation.
Verify that the get observation method returns the appropriate gui observation .
@Test
    public void testGetObservation()
    {
        UUID obsUuid = UUID.randomUUID();
        Observation mockedObs = createMockedObservation(obsUuid, 1000, true, ObservationSubTypeEnum.CBRNE_TRIGGER, 
                ObservationSubTypeEnum.STATUS);
        when(m_ObservationStore.find(obsUuid)).thenReturn(mockedObs);
        GuiObservation guiObs = m_SUT.getObservation(obsUuid);
        assertThat(guiObs.getObservation().getUuid(), is(obsUuid));
        assertThat(guiObs.getObservation().getCreatedTimestamp(), is(1000L));
        assertThat(guiObs.getRelatedObservationModels().get(0)
            .getObservationSubType(), is(ObservationSubTypeEnum.CBRNE_TRIGGER));
        assertThat(guiObs.getRelatedObservationModels().get(1).getObservationSubType(), 
                is(ObservationSubTypeEnum.STATUS));
    }
@ Test public void testGetObservation ( ) { UUID obsUuid = UUID . randomUUID ( ) ; Observation mockedObs = createMockedObservation ( obsUuid , 1000 , true , ObservationSubTypeEnum . CBRNE_TRIGGER , ObservationSubTypeEnum . STATUS ) ; when ( m_ObservationStore . find ( obsUuid ) ) . thenReturn ( mockedObs ) ; GuiObservation guiObs = m_SUT . getObservation ( obsUuid ) ; assertThat ( guiObs . getObservation ( ) . getUuid ( ) , is ( obsUuid ) ) ; assertThat ( guiObs . getObservation ( ) . getCreatedTimestamp ( ) , is ( 1000L ) ) ; assertThat ( guiObs . getRelatedObservationModels ( ) . get ( 0 ) . getObservationSubType ( ) , is ( ObservationSubTypeEnum . CBRNE_TRIGGER ) ) ; assertThat ( guiObs . getRelatedObservationModels ( ) . get ( 1 ) . getObservationSubType ( ) , is ( ObservationSubTypeEnum . STATUS ) ) ; }
Verify that the get observation method returns the appropriate gui observation.
Verify that the get observation method returns the appropriate gui observation .