mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/messaging/TestMessageFactoryImpl.java
private ByteString confirmWrapperTrySend(final MessageWrapper wrapper, final Namespace namespace, final int times)
    {
        // request sending
        wrapper.trySend(m_RemoteId, EncryptType.NONE);

        // capture the payload constructed in the message factory
        ArgumentCaptor<TerraHarvestPayload> payloadCap = ArgumentCaptor.forClass(TerraHarvestPayload.class);
        verify(m_MessageSender, times(times)).trySendMessage(eq(m_RemoteId), payloadCap.capture(), 
                eq(EncryptType.NONE));

        // verify Payload
        TerraHarvestPayload payloadCaptured = payloadCap.getValue();
        assertThat(payloadCaptured.getNamespace(), is(namespace));
        
        return payloadCaptured.getNamespaceMessage();
    }
/**
     * Confirm that the wrapper passed in can 'trySend' 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
     * @param times
     *     the number of times the message sender will have executed the 'trySend' call for the single test method
     * @return
     *     the bytestring data containing the namespace message
     */
Confirm that the wrapper passed in can 'trySend' 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
@param times
the number of times the message sender will have executed the 'trySend' call for the single test method
@return
the bytestring data containing the namespace message
Confirm that the wrapper passed in can ' trySend ' 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 @param times the number of times the message sender will have executed the ' trySend ' call for the single test method @return the bytestring data containing the namespace message
private ByteString confirmWrapperTrySend(final MessageWrapper wrapper, final Namespace namespace, final int times)
    {
        wrapper.trySend(m_RemoteId, EncryptType.NONE);
        ArgumentCaptor<TerraHarvestPayload> payloadCap = ArgumentCaptor.forClass(TerraHarvestPayload.class);
        verify(m_MessageSender, times(times)).trySendMessage(eq(m_RemoteId), payloadCap.capture(), 
                eq(EncryptType.NONE));
        TerraHarvestPayload payloadCaptured = payloadCap.getValue();
        assertThat(payloadCaptured.getNamespace(), is(namespace));
        return payloadCaptured.getNamespaceMessage();
    }
private ByteString confirmWrapperTrySend ( final MessageWrapper wrapper , final Namespace namespace , final int times ) { wrapper . trySend ( m_RemoteId , EncryptType . NONE ) ; ArgumentCaptor < TerraHarvestPayload > payloadCap = ArgumentCaptor . forClass ( TerraHarvestPayload . class ) ; verify ( m_MessageSender , times ( times ) ) . trySendMessage ( eq ( m_RemoteId ) , payloadCap . capture ( ) , eq ( EncryptType . NONE ) ) ; TerraHarvestPayload payloadCaptured = payloadCap . getValue ( ) ; assertThat ( payloadCaptured . getNamespace ( ) , is ( namespace ) ) ; return payloadCaptured . getNamespaceMessage ( ) ; }
Confirm that the wrapper passed in can 'trySend' a message.
Confirm that the wrapper passed in can ' trySend ' a message .
// request sending // capture the payload constructed in the message factory // verify Payload