@Test
public void testReceivePayLoadGTX() {

    // Setup
    final GlobalTransactionStepDefinition transactionPipeline = mock(GlobalTransactionStepDefinition.class, RETURNS_DEEP_STUBS);
    final BiConsumer target = mock(BiConsumer.class);
    final String payload = "payload";
    final String gtx = "gtx";
    AbstractTransactionStepDefinition.ReceivedCommandGTX command = new AbstractTransactionStepDefinition.ReceivedCommandGTX(Object.class, target);
    when(transactionPipeline.getReceivedCommandGTX()).thenReturn(command);
    when(transactionPipeline.getIn().getId()).thenReturn("someid");
    when(mockCommandOrchestrator.retreive(anyString(), any())).thenReturn(Optional.of(payload));
    // Run the test
    innerGlobalTxStepVisitorUnderTest.receivePayLoadGTX(transactionPipeline, gtx);
    // Verify the results
    verify(mockCommandOrchestrator).retreive("someid", Object.class);
    verify(target).accept(same(gtx), any());
}