.setExecutor(customExecutor)
.setInvokerThreadCount(2)
.setPublisherThreadCount(3)
);
testSubject.subscribe(StubCommand.class.getName(), stubHandler);
final EventStreamDecorator mockDecorator = mock(EventStreamDecorator.class);
when(mockDecorator.decorateForAppend(anyString(),
any(EventSourcedAggregateRoot.class),
any(DomainEventStream.class)))
.thenAnswer(new ReturnsArgumentAt(2));
when(mockDecorator.decorateForRead(anyString(), any(), any(DomainEventStream.class)))
.thenAnswer(new ReturnsArgumentAt(2));
stubHandler.setRepository(testSubject
.createRepository(new GenericAggregateFactory<StubAggregate>(StubAggregate.class),
mockDecorator));