mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/messaging/TestMessageResponseWrapperImpl.java
@Test
    public void testQueueResponse()
    {
        //mock channel
        RemoteChannel channel = mock(RemoteChannel.class);
        
        //messages
        m_RequestMessage = createTerraHarvestRequest();
        m_Payload = TestMessageWrapperImpl.createPayload();
        
        //create response wrapper
        m_SUT = new MessageResponseWrapperImpl(m_RequestMessage, m_Payload, m_MessageSender);
        
        //set sender behavior
        when(m_MessageSender.queueMessageResponse(m_RequestMessage, m_Payload, channel)).thenReturn(true);
        
        boolean result = m_SUT.queue(channel);
        
        //verify interactions
        verify(m_MessageSender).queueMessageResponse(m_RequestMessage, m_Payload, channel);
        assertThat(result, is(true));
    }
/**
     * Verify that correct message information is forwarded to the message sender when 'queueResponse'
     * is called.
     */
Verify that correct message information is forwarded to the message sender when 'queueResponse'
is called.
Verify that correct message information is forwarded to the message sender when ' queueResponse ' is called .
@Test
    public void testQueueResponse()
    {
        RemoteChannel channel = mock(RemoteChannel.class);
        m_RequestMessage = createTerraHarvestRequest();
        m_Payload = TestMessageWrapperImpl.createPayload();
        m_SUT = new MessageResponseWrapperImpl(m_RequestMessage, m_Payload, m_MessageSender);
        when(m_MessageSender.queueMessageResponse(m_RequestMessage, m_Payload, channel)).thenReturn(true);
        boolean result = m_SUT.queue(channel);
        verify(m_MessageSender).queueMessageResponse(m_RequestMessage, m_Payload, channel);
        assertThat(result, is(true));
    }
@ Test public void testQueueResponse ( ) { RemoteChannel channel = mock ( RemoteChannel . class ) ; m_RequestMessage = createTerraHarvestRequest ( ) ; m_Payload = TestMessageWrapperImpl . createPayload ( ) ; m_SUT = new MessageResponseWrapperImpl ( m_RequestMessage , m_Payload , m_MessageSender ) ; when ( m_MessageSender . queueMessageResponse ( m_RequestMessage , m_Payload , channel ) ) . thenReturn ( true ) ; boolean result = m_SUT . queue ( channel ) ; verify ( m_MessageSender ) . queueMessageResponse ( m_RequestMessage , m_Payload , channel ) ; assertThat ( result , is ( true ) ) ; }
Verify that correct message information is forwarded to the message sender when 'queueResponse'
 is called.
Verify that correct message information is forwarded to the message sender when ' queueResponse ' is called .
//mock channel //messages //create response wrapper //set sender behavior //verify interactions