mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/observation/TestObservationHelper.java
@Test
    public void testHandleGetObsResponseWithObservations()
    {
        Event createdEvent = createARemoteObservationMessage(MessageType.GET);
        
        m_RemoteEventHandler.handleEvent(createdEvent);
        
        ArgumentCaptor<Event> eventCaptor = ArgumentCaptor.forClass(Event.class);
        verify(m_EventAdmin, times(1)).postEvent(eventCaptor.capture());
        
        Event capturedEvent = eventCaptor.getValue();
        
        assertThat(capturedEvent, notNullValue());
        
        assertThat(capturedEvent.getTopic(), is(ObservationMgr.TOPIC_OBS_STORE_UPDATED));
        
        verify(m_GrowlUtil, times(1)).createGlobalFacesMessage(eq(FacesMessage.SEVERITY_INFO), 
                eq("Observation Retrieval Complete"), eq("3 observations were retrieved."));
    }
/*
     * Verify GetObservationResponseData with observations produces an EventAdmin event.
     */
Verify GetObservationResponseData with observations produces an EventAdmin event.
Verify GetObservationResponseData with observations produces an EventAdmin event .
@Test
    public void testHandleGetObsResponseWithObservations()
    {
        Event createdEvent = createARemoteObservationMessage(MessageType.GET);
        m_RemoteEventHandler.handleEvent(createdEvent);
        ArgumentCaptor<Event> eventCaptor = ArgumentCaptor.forClass(Event.class);
        verify(m_EventAdmin, times(1)).postEvent(eventCaptor.capture());
        Event capturedEvent = eventCaptor.getValue();
        assertThat(capturedEvent, notNullValue());
        assertThat(capturedEvent.getTopic(), is(ObservationMgr.TOPIC_OBS_STORE_UPDATED));
        verify(m_GrowlUtil, times(1)).createGlobalFacesMessage(eq(FacesMessage.SEVERITY_INFO), 
                eq("Observation Retrieval Complete"), eq("3 observations were retrieved."));
    }
@ Test public void testHandleGetObsResponseWithObservations ( ) { Event createdEvent = createARemoteObservationMessage ( MessageType . GET ) ; m_RemoteEventHandler . handleEvent ( createdEvent ) ; ArgumentCaptor < Event > eventCaptor = ArgumentCaptor . forClass ( Event . class ) ; verify ( m_EventAdmin , times ( 1 ) ) . postEvent ( eventCaptor . capture ( ) ) ; Event capturedEvent = eventCaptor . getValue ( ) ; assertThat ( capturedEvent , notNullValue ( ) ) ; assertThat ( capturedEvent . getTopic ( ) , is ( ObservationMgr . TOPIC_OBS_STORE_UPDATED ) ) ; verify ( m_GrowlUtil , times ( 1 ) ) . createGlobalFacesMessage ( eq ( FacesMessage . SEVERITY_INFO ) , eq ( "Observation Retrieval Complete" ) , eq ( "3 observations were retrieved." ) ) ; }
Verify GetObservationResponseData with observations produces an EventAdmin event.
Verify GetObservationResponseData with observations produces an EventAdmin event .