@Test public void testVisit() { final LocalTransactionStepDefinition transactionPipeline = mock(LocalTransactionStepDefinition.class); final BaseTransactionEvent blow = mock(BaseTransactionEvent.class); final LocalTransaction transaction = mock(LocalTransaction.class, RETURNS_DEEP_STUBS); when(transactionPipeline.getBlow()).thenReturn(Stream.of(blow)); when(blow.getId()).thenReturn("blow"); when(mockProvision.getLocalTransaction()).thenReturn(transaction); outerLocalTxStepVisitorUnderTest.visit(transactionPipeline); verify(mockBubbleCache).addBubble(same("blow"), any(BubbleMessage.class)); verify(mockApplicationEventPublisher).publishEvent(blow); }
@Override public void visit(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> localTransactionStepDefinition) { localTransactionStepDefinition.getBlow().forEach(e -> { BubbleMessage bubbleMessage = new BubbleMessage(getProvision().getLocalTransaction()); getBubbleCache().addBubble(e.getId(), bubbleMessage); getApplicationEventPublisher().publishEvent(e); }); }
OuterLocalTxStepVisitor extends StepLocalTxVisitor { @Override public void visit(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> localTransactionStepDefinition) { localTransactionStepDefinition.getBlow().forEach(e -> { BubbleMessage bubbleMessage = new BubbleMessage(getProvision().getLocalTransaction()); getBubbleCache().addBubble(e.getId(), bubbleMessage); getApplicationEventPublisher().publishEvent(e); }); } }
OuterLocalTxStepVisitor extends StepLocalTxVisitor { @Override public void visit(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> localTransactionStepDefinition) { localTransactionStepDefinition.getBlow().forEach(e -> { BubbleMessage bubbleMessage = new BubbleMessage(getProvision().getLocalTransaction()); getBubbleCache().addBubble(e.getId(), bubbleMessage); getApplicationEventPublisher().publishEvent(e); }); } OuterLocalTxStepVisitor(BubbleCache bubbleCache, ApplicationEventPublisher applicationEventPublisher,
                                   VisitorProvision provision, CommandOrchestrator commandOrchestrator, TransactionUtilities utilities); }
OuterLocalTxStepVisitor extends StepLocalTxVisitor { @Override public void visit(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> localTransactionStepDefinition) { localTransactionStepDefinition.getBlow().forEach(e -> { BubbleMessage bubbleMessage = new BubbleMessage(getProvision().getLocalTransaction()); getBubbleCache().addBubble(e.getId(), bubbleMessage); getApplicationEventPublisher().publishEvent(e); }); } OuterLocalTxStepVisitor(BubbleCache bubbleCache, ApplicationEventPublisher applicationEventPublisher,
                                   VisitorProvision provision, CommandOrchestrator commandOrchestrator, TransactionUtilities utilities); static OuterLocalTxStepVisitorBuilder builder(); @Override void visit(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> localTransactionStepDefinition); }
OuterLocalTxStepVisitor extends StepLocalTxVisitor { @Override public void visit(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> localTransactionStepDefinition) { localTransactionStepDefinition.getBlow().forEach(e -> { BubbleMessage bubbleMessage = new BubbleMessage(getProvision().getLocalTransaction()); getBubbleCache().addBubble(e.getId(), bubbleMessage); getApplicationEventPublisher().publishEvent(e); }); } OuterLocalTxStepVisitor(BubbleCache bubbleCache, ApplicationEventPublisher applicationEventPublisher,
                                   VisitorProvision provision, CommandOrchestrator commandOrchestrator, TransactionUtilities utilities); static OuterLocalTxStepVisitorBuilder builder(); @Override void visit(LocalTransactionStepDefinition<? extends BaseLocalTransactionEvent> localTransactionStepDefinition);  }