mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/messaging/TestMessageFactoryImpl.java
private ByteString confirmResponseWrapperQueue(final MessageResponseWrapper wrapper, final Namespace namespace)
    {
        // request to send over a mock channel
        RemoteChannel channel = mock(RemoteChannel.class);
        wrapper.queue(channel);

        // capture the payload constructed in the message factory
        ArgumentCaptor<TerraHarvestPayload> payloadCap = ArgumentCaptor.forClass(TerraHarvestPayload.class);
        verify(m_MessageSender).queueMessageResponse(eq(createRequestFiller()), payloadCap.capture(), 
                eq(channel));

        // verify Payload
        TerraHarvestPayload payloadCaptured = payloadCap.getValue();
        assertThat(payloadCaptured.getNamespace(), is(namespace));
        
        return payloadCaptured.getNamespaceMessage();
    }
/**
     * Confirm that the response wrapper passed in can 'queue' a message. Verifies the expected namespace of the 
     * intercepted payload message.
     * @param wrapper
     *     the message wrapper that contains the payload to send
     * @param namespace
     *     the expected namespace
     * @return
     *     the bytestring data containing the namespace message
     */
Confirm that the response wrapper passed in can 'queue' a message. Verifies the expected namespace of the
intercepted payload message.
@param wrapper
the message wrapper that contains the payload to send
@param namespace
the expected namespace
@return
the bytestring data containing the namespace message
Confirm that the response wrapper passed in can ' queue ' a message . Verifies the expected namespace of the intercepted payload message . @param wrapper the message wrapper that contains the payload to send @param namespace the expected namespace @return the bytestring data containing the namespace message
private ByteString confirmResponseWrapperQueue(final MessageResponseWrapper wrapper, final Namespace namespace)
    {
        RemoteChannel channel = mock(RemoteChannel.class);
        wrapper.queue(channel);
        ArgumentCaptor<TerraHarvestPayload> payloadCap = ArgumentCaptor.forClass(TerraHarvestPayload.class);
        verify(m_MessageSender).queueMessageResponse(eq(createRequestFiller()), payloadCap.capture(), 
                eq(channel));
        TerraHarvestPayload payloadCaptured = payloadCap.getValue();
        assertThat(payloadCaptured.getNamespace(), is(namespace));
        return payloadCaptured.getNamespaceMessage();
    }
private ByteString confirmResponseWrapperQueue ( final MessageResponseWrapper wrapper , final Namespace namespace ) { RemoteChannel channel = mock ( RemoteChannel . class ) ; wrapper . queue ( channel ) ; ArgumentCaptor < TerraHarvestPayload > payloadCap = ArgumentCaptor . forClass ( TerraHarvestPayload . class ) ; verify ( m_MessageSender ) . queueMessageResponse ( eq ( createRequestFiller ( ) ) , payloadCap . capture ( ) , eq ( channel ) ) ; TerraHarvestPayload payloadCaptured = payloadCap . getValue ( ) ; assertThat ( payloadCaptured . getNamespace ( ) , is ( namespace ) ) ; return payloadCaptured . getNamespaceMessage ( ) ; }
Confirm that the response wrapper passed in can 'queue' a message.
Confirm that the response wrapper passed in can ' queue ' a message .
// request to send over a mock channel // capture the payload constructed in the message factory // verify Payload