Aggregate extends CommandHandlingEntity<I, S, B> implements EventPlayer, EventReactor { @Override protected final B builder() { return super.builder(); } protected  Aggregate(); protected  Aggregate(I id); @Override final BatchDispatchOutcome play(Iterable<Event> events);  }
@Test @DisplayName("not allow getting state builder from outside event applier") void notGetStateBuilderOutsideOfApplier() { assertThrows(IllegalStateException.class, () -> new IntAggregate(100).builder()); }