mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/observation/TestRemoteObservationListener.java
@Test
    public void testGetObservationResponse_ZeroObs() throws ValidationFailedException, IllegalArgumentException, 
        PersistenceFailedException
    {
        m_ObservationHandler.handleEvent(getEmptyObservationEvent());

        verify(m_ObservationStore, never()).persist(Mockito.any(Observation.class));
        
        ArgumentCaptor<Event> captor = ArgumentCaptor.forClass(Event.class);
        //verify push event
        verify(m_EventAdmin).postEvent(captor.capture());
        assertThat(captor.getValue().getTopic(), is(RemoteEventConstants.TOPIC_OBS_STORE_RETRIEVE_COMPLETE));
        assertThat((Integer)captor.getValue().getProperty(RemoteEventConstants.EVENT_PROP_OBS_NUMBER_RETRIEVED), is(0));
    }
/**
     * Verify that if zero observations are returned when retrieving that an event is still posted.
     */
Verify that if zero observations are returned when retrieving that an event is still posted.
Verify that if zero observations are returned when retrieving that an event is still posted .
@Test
    public void testGetObservationResponse_ZeroObs() throws ValidationFailedException, IllegalArgumentException, 
        PersistenceFailedException
    {
        m_ObservationHandler.handleEvent(getEmptyObservationEvent());
        verify(m_ObservationStore, never()).persist(Mockito.any(Observation.class));
        ArgumentCaptor<Event> captor = ArgumentCaptor.forClass(Event.class);
        verify(m_EventAdmin).postEvent(captor.capture());
        assertThat(captor.getValue().getTopic(), is(RemoteEventConstants.TOPIC_OBS_STORE_RETRIEVE_COMPLETE));
        assertThat((Integer)captor.getValue().getProperty(RemoteEventConstants.EVENT_PROP_OBS_NUMBER_RETRIEVED), is(0));
    }
@ Test public void testGetObservationResponse_ZeroObs ( ) throws ValidationFailedException , IllegalArgumentException , PersistenceFailedException { m_ObservationHandler . handleEvent ( getEmptyObservationEvent ( ) ) ; verify ( m_ObservationStore , never ( ) ) . persist ( Mockito . any ( Observation . class ) ) ; ArgumentCaptor < Event > captor = ArgumentCaptor . forClass ( Event . class ) ; verify ( m_EventAdmin ) . postEvent ( captor . capture ( ) ) ; assertThat ( captor . getValue ( ) . getTopic ( ) , is ( RemoteEventConstants . TOPIC_OBS_STORE_RETRIEVE_COMPLETE ) ) ; assertThat ( ( Integer ) captor . getValue ( ) . getProperty ( RemoteEventConstants . EVENT_PROP_OBS_NUMBER_RETRIEVED ) , is ( 0 ) ) ; }
Verify that if zero observations are returned when retrieving that an event is still posted.
Verify that if zero observations are returned when retrieving that an event is still posted .
//verify push event