mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/TestEventChannel.java
@Test
    public void testQueueMessage()
    {
        assertThat(m_SUT.queueMessage(m_ThMessage), equalTo(true));
        
        ArgumentCaptor<Event> eventCaptor = ArgumentCaptor.forClass(Event.class);
        verify(m_EventAdmin).postEvent(eventCaptor.capture());
        
        Event unreachableEvent = eventCaptor.getValue();
        assertThat(unreachableEvent.getTopic(), equalTo(RemoteConstants.TOPIC_MESSAGE_SEND_UNREACHABLE_DEST));
        assertThat(unreachableEvent.getProperty(RemoteConstants.EVENT_PROP_DEST_ID), equalTo(m_RemoteSystemId));
        assertThat(unreachableEvent.getProperty(RemoteConstants.EVENT_PROP_SOURCE_ID), equalTo(m_SourceId));
        assertThat(unreachableEvent.getProperty(RemoteConstants.EVENT_PROP_MESSAGE), equalTo(m_ThMessage));
    }
/**
     * Verify that queue message posts the appropriate event with proper values.
     */
Verify that queue message posts the appropriate event with proper values.
Verify that queue message posts the appropriate event with proper values .
@Test
    public void testQueueMessage()
    {
        assertThat(m_SUT.queueMessage(m_ThMessage), equalTo(true));
        ArgumentCaptor<Event> eventCaptor = ArgumentCaptor.forClass(Event.class);
        verify(m_EventAdmin).postEvent(eventCaptor.capture());
        Event unreachableEvent = eventCaptor.getValue();
        assertThat(unreachableEvent.getTopic(), equalTo(RemoteConstants.TOPIC_MESSAGE_SEND_UNREACHABLE_DEST));
        assertThat(unreachableEvent.getProperty(RemoteConstants.EVENT_PROP_DEST_ID), equalTo(m_RemoteSystemId));
        assertThat(unreachableEvent.getProperty(RemoteConstants.EVENT_PROP_SOURCE_ID), equalTo(m_SourceId));
        assertThat(unreachableEvent.getProperty(RemoteConstants.EVENT_PROP_MESSAGE), equalTo(m_ThMessage));
    }
@ Test public void testQueueMessage ( ) { assertThat ( m_SUT . queueMessage ( m_ThMessage ) , equalTo ( true ) ) ; ArgumentCaptor < Event > eventCaptor = ArgumentCaptor . forClass ( Event . class ) ; verify ( m_EventAdmin ) . postEvent ( eventCaptor . capture ( ) ) ; Event unreachableEvent = eventCaptor . getValue ( ) ; assertThat ( unreachableEvent . getTopic ( ) , equalTo ( RemoteConstants . TOPIC_MESSAGE_SEND_UNREACHABLE_DEST ) ) ; assertThat ( unreachableEvent . getProperty ( RemoteConstants . EVENT_PROP_DEST_ID ) , equalTo ( m_RemoteSystemId ) ) ; assertThat ( unreachableEvent . getProperty ( RemoteConstants . EVENT_PROP_SOURCE_ID ) , equalTo ( m_SourceId ) ) ; assertThat ( unreachableEvent . getProperty ( RemoteConstants . EVENT_PROP_MESSAGE ) , equalTo ( m_ThMessage ) ) ; }
Verify that queue message posts the appropriate event with proper values.
Verify that queue message posts the appropriate event with proper values .