mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/observation/TestRemoteObservationListener.java
@Test
    public void testRemoteObservationHandlerFullQueue() throws InterruptedException
    {
        // deactivate component so thread isn't running to read items off of queue
        m_SUT.deactivate();
        
        Observation obs = null;
        for (int i = 0; i < 102; i++)
        {
            obs = new Observation().withUuid(UUID.randomUUID());
            // properties for the event
            final Map<String, Object> props = new HashMap<String, Object>();
            props.put(ObservationStore.EVENT_PROP_OBSERVATION, obs);
            m_RemoteObsListener.handleEvent(new Event(ObservationStore.TOPIC_OBSERVATION_PERSISTED_WITH_OBS, props));
        }
        assertThat(obs, is(notNullValue()));

        verify(m_Logging).info("The remote observations with UUID %s could not be received, the received observation"
                + "queue is currently full.", obs.getUuid());
    }
/**
     * Verify that a message logged when the received observation queue is full.
     */
Verify that a message logged when the received observation queue is full.
Verify that a message logged when the received observation queue is full .
@Test
    public void testRemoteObservationHandlerFullQueue() throws InterruptedException
    {
        m_SUT.deactivate();
        Observation obs = null;
        for (int i = 0; i < 102; i++)
        {
            obs = new Observation().withUuid(UUID.randomUUID());
            final Map<String, Object> props = new HashMap<String, Object>();
            props.put(ObservationStore.EVENT_PROP_OBSERVATION, obs);
            m_RemoteObsListener.handleEvent(new Event(ObservationStore.TOPIC_OBSERVATION_PERSISTED_WITH_OBS, props));
        }
        assertThat(obs, is(notNullValue()));
        verify(m_Logging).info("The remote observations with UUID %s could not be received, the received observation"
                + "queue is currently full.", obs.getUuid());
    }
@ Test public void testRemoteObservationHandlerFullQueue ( ) throws InterruptedException { m_SUT . deactivate ( ) ; Observation obs = null ; for ( int i = 0 ; i < 102 ; i ++ ) { obs = new Observation ( ) . withUuid ( UUID . randomUUID ( ) ) ; final Map < String , Object > props = new HashMap < String , Object > ( ) ; props . put ( ObservationStore . EVENT_PROP_OBSERVATION , obs ) ; m_RemoteObsListener . handleEvent ( new Event ( ObservationStore . TOPIC_OBSERVATION_PERSISTED_WITH_OBS , props ) ) ; } assertThat ( obs , is ( notNullValue ( ) ) ) ; verify ( m_Logging ) . info ( "The remote observations with UUID %s could not be received, the received observation" + "queue is currently full." , obs . getUuid ( ) ) ; }
Verify that a message logged when the received observation queue is full.
Verify that a message logged when the received observation queue is full .
// deactivate component so thread isn't running to read items off of queue // properties for the event