mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/observation/TestObservationHelper.java
@Test
    public void testHandleRemoveObsResponse()
    {
        Event createdEvent = createARemoteObservationMessage(MessageType.REMOVE);
        
        m_RemoteObsStoreHandler.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("Observations Removed"), eq(String.format("Controller 0x%08x has remotely " +
                        "removed observations for selected assets.", 1)));
    }
/*
     * Verify a RemoveObservationResponseData message produces only a growl message.
     */
Verify a RemoveObservationResponseData message produces only a growl message.
Verify a RemoveObservationResponseData message produces only a growl message .
@Test
    public void testHandleRemoveObsResponse()
    {
        Event createdEvent = createARemoteObservationMessage(MessageType.REMOVE);
        m_RemoteObsStoreHandler.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("Observations Removed"), eq(String.format("Controller 0x%08x has remotely " +
                        "removed observations for selected assets.", 1)));
    }
@ Test public void testHandleRemoveObsResponse ( ) { Event createdEvent = createARemoteObservationMessage ( MessageType . REMOVE ) ; m_RemoteObsStoreHandler . 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 ( "Observations Removed" ) , eq ( String . format ( "Controller 0x%08x has remotely " + "removed observations for selected assets." , 1 ) ) ) ; }
Verify a RemoveObservationResponseData message produces only a growl message.
Verify a RemoveObservationResponseData message produces only a growl message .