@Test
public void testVisit() {

    // Setup
    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);
    // Run the test
    outerLocalTxStepVisitorUnderTest.visit(transactionPipeline);
    // Verify the results
    verify(mockBubbleCache).addBubble(same("blow"), any(BubbleMessage.class));
    verify(mockApplicationEventPublisher).publishEvent(blow);
}