@Test public void testReceivePayLoadGTX() { final LocalTransactionStepDefinition transactionPipeline = mock(LocalTransactionStepDefinition.class, RETURNS_DEEP_STUBS);; final String gtx = "gtx"; final BiConsumer target = mock(BiConsumer.class); final String payload = "payload"; 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)); innerLocalTxStepVisitorUnderTest.receivePayLoadGTX(transactionPipeline, gtx); verify(mockCommandOrchestrator).retreive("someid", Object.class); verify(target).accept(same(gtx), any()); }
void receivePayLoadGTX(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> transactionPipeline, String gtx) { final AbstractTransactionStepDefinition.ReceivedCommandGTX receivedCommandGTX = transactionPipeline .getReceivedCommandGTX(); if (receivedCommandGTX != null) { Optional<Object> payload = getCommandOrchestrator().retreive(transactionPipeline.getIn().getId(), receivedCommandGTX.getTarget()); payload.ifPresent(p -> transactionPipeline.getReceivedCommandGTX().getConsumer().accept(gtx, p)); } }
InnerLocalTxStepVisitor extends StepLocalTxVisitor { void receivePayLoadGTX(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> transactionPipeline, String gtx) { final AbstractTransactionStepDefinition.ReceivedCommandGTX receivedCommandGTX = transactionPipeline .getReceivedCommandGTX(); if (receivedCommandGTX != null) { Optional<Object> payload = getCommandOrchestrator().retreive(transactionPipeline.getIn().getId(), receivedCommandGTX.getTarget()); payload.ifPresent(p -> transactionPipeline.getReceivedCommandGTX().getConsumer().accept(gtx, p)); } } }
InnerLocalTxStepVisitor extends StepLocalTxVisitor { void receivePayLoadGTX(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> transactionPipeline, String gtx) { final AbstractTransactionStepDefinition.ReceivedCommandGTX receivedCommandGTX = transactionPipeline .getReceivedCommandGTX(); if (receivedCommandGTX != null) { Optional<Object> payload = getCommandOrchestrator().retreive(transactionPipeline.getIn().getId(), receivedCommandGTX.getTarget()); payload.ifPresent(p -> transactionPipeline.getReceivedCommandGTX().getConsumer().accept(gtx, p)); } } InnerLocalTxStepVisitor(BubbleCache bubbleCache, ApplicationEventPublisher applicationEventPublisher,
			VisitorProvision provision, CommandOrchestrator commandOrchestrator, TransactionUtilities utilities); }
InnerLocalTxStepVisitor extends StepLocalTxVisitor { void receivePayLoadGTX(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> transactionPipeline, String gtx) { final AbstractTransactionStepDefinition.ReceivedCommandGTX receivedCommandGTX = transactionPipeline .getReceivedCommandGTX(); if (receivedCommandGTX != null) { Optional<Object> payload = getCommandOrchestrator().retreive(transactionPipeline.getIn().getId(), receivedCommandGTX.getTarget()); payload.ifPresent(p -> transactionPipeline.getReceivedCommandGTX().getConsumer().accept(gtx, p)); } } InnerLocalTxStepVisitor(BubbleCache bubbleCache, ApplicationEventPublisher applicationEventPublisher,
			VisitorProvision provision, CommandOrchestrator commandOrchestrator, TransactionUtilities utilities); static InnerLocalTxStepVisitorBuilder builder(); @Override void visit(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> transactionPipeline); }
InnerLocalTxStepVisitor extends StepLocalTxVisitor { void receivePayLoadGTX(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> transactionPipeline, String gtx) { final AbstractTransactionStepDefinition.ReceivedCommandGTX receivedCommandGTX = transactionPipeline .getReceivedCommandGTX(); if (receivedCommandGTX != null) { Optional<Object> payload = getCommandOrchestrator().retreive(transactionPipeline.getIn().getId(), receivedCommandGTX.getTarget()); payload.ifPresent(p -> transactionPipeline.getReceivedCommandGTX().getConsumer().accept(gtx, p)); } } InnerLocalTxStepVisitor(BubbleCache bubbleCache, ApplicationEventPublisher applicationEventPublisher,
			VisitorProvision provision, CommandOrchestrator commandOrchestrator, TransactionUtilities utilities); static InnerLocalTxStepVisitorBuilder builder(); @Override void visit(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> transactionPipeline);  }