@Test
public void testBuilder() {

    // Setup
    final BaseLocalTransactionEvent in = mock(BaseLocalTransactionEvent.class);
    final Supplier process = mock(Supplier.class);
    final BaseTransactionCommand send = mock(BaseTransactionCommand.class);
    final BaseTransactionEvent blow = mock(BaseTransactionEvent.class);
    final WorkerMeta meta = mock(WorkerMeta.class);
    final Consumer attach = mock(Consumer.class);
    // Run the test
    final LocalTransactionStepDefinition result = LocalTransactionStepDefinition.builder()
            .in(in)
            .process(Optional.of(process))
            .send(Stream.of(send))
            .blow(Stream.of(blow))
            .meta(meta)
            .attach(attach)
            .build();
    // Verify the results
    assertEquals(in, result.getIn());
    assertEquals(process, result.getProcess().get());
    assertTrue(result.getSend().allMatch(s -> s.equals(send)));
    assertTrue(result.getBlow().allMatch(b -> b.equals(blow)));
    assertEquals(meta, result.getMeta());
    assertEquals(attach, result.getAttach().get());
}