BusinessLocalTransactionManagerImpl implements BusinessLocalTransactionManager { StepLocalTxVisitor buildInnerLocalTxStep(Optional<LocalTransaction> localTransaction) { VisitorProvision provision = VisitorProvision.builder().localTransaction(localTransaction.get()).build(); return InnerLocalTxStepVisitor.builder().provision(provision).bubbleCache(bubbleCache) .transactionUtilities(txUtilities).applicationEventPublisher(applicationEventPublisher) .commandOrchestrator(commandOrchestrator).build(); } BusinessLocalTransactionManagerImpl(GlobalTransactionRepository globalTransactionRepository,
			CommandOrchestrator commandOrchestrator, ApplicationEventPublisher applicationEventPublisher,
			BubbleCache bubbleCache, TransactionUtilities txUtilities); @Override void begin(final LocalTransactionStepDefinition localTransactionStepDefinition); @Override void commit(
			final LocalTransactionStepDefinition<? extends BaseTransactionEvent> localTransactionStepDefinition); @Override void rollBack(
			LocalTransactionStepDefinition<? extends BaseTransactionEvent> localTransactionStepDefinition); @Override Optional<GlobalTransaction> findGlobalTransaction(final String GTX);  }
@Test public void testBuildInnerLocalTxStep() { final LocalTransaction localTransaction = mock(LocalTransaction.class); final StepLocalTxVisitor result = businessLocalTransactionManagerImplUnderTest.buildInnerLocalTxStep(Optional.of(localTransaction)); assertEquals(result.getProvision().getLocalTransaction(), localTransaction); assertEquals(result.getBubbleCache(), mockBubbleCache); assertEquals(result.getApplicationEventPublisher(), mockApplicationEventPublisher); assertEquals(result.getCommandOrchestrator(), mockCommandOrchestrator); }