@Test @DisplayName("not allow nulls in Builder") void nullTolerance() { new NullPointerTester() .setDefault(EntityClass.class, TEST_ENTITY_CLASS) .setDefault(Object.class, 42) .testInstanceMethods(EntityLifecycle.newBuilder(), PACKAGE); }
static Builder newBuilder() { return new Builder(); }
EntityLifecycle { static Builder newBuilder() { return new Builder(); } }
EntityLifecycle { static Builder newBuilder() { return new Builder(); } @VisibleForTesting protected  EntityLifecycle(Object entityId,
                              TypeUrl entityType,
                              SystemWriteSide writeSide,
                              EventFilter eventFilter,
                              EntityTypeName typeName); private  EntityLifecycle(Builder builder); }
EntityLifecycle { static Builder newBuilder() { return new Builder(); } @VisibleForTesting protected  EntityLifecycle(Object entityId,
                              TypeUrl entityType,
                              SystemWriteSide writeSide,
                              EventFilter eventFilter,
                              EntityTypeName typeName); private  EntityLifecycle(Builder builder); final void onEntityCreated(EntityOption.Kind entityKind); final void onTargetAssignedToCommand(CommandId commandId); final void onDispatchCommand(Command command); final void onCommandHandled(Command command); final void onCommandRejected(CommandId commandId, Event rejection); final void onDispatchEventToSubscriber(Event event); final void onEventImported(Event event); final void onDispatchEventToReactor(Event event); final void onStateChanged(EntityRecordChange change,
                                     Set<? extends MessageId> messageIds,
                                     Origin origin); final void onRemovedFromStorage(Iterable<MessageId> signalIds); final Optional<Event> onMigrationApplied(); final void onInvalidEntity(MessageId lastMessage,
                                      MessageId root,
                                      ValidationError error,
                                      Version version); final void onDispatchingFailed(SignalEnvelope<?, ?, ?> signal, Error error); void onDuplicateEvent(EventEnvelope event); void onDuplicateCommand(CommandEnvelope command); void onCorruptedState(BatchDispatchOutcome outcome); }
EntityLifecycle { static Builder newBuilder() { return new Builder(); } @VisibleForTesting protected  EntityLifecycle(Object entityId,
                              TypeUrl entityType,
                              SystemWriteSide writeSide,
                              EventFilter eventFilter,
                              EntityTypeName typeName); private  EntityLifecycle(Builder builder); final void onEntityCreated(EntityOption.Kind entityKind); final void onTargetAssignedToCommand(CommandId commandId); final void onDispatchCommand(Command command); final void onCommandHandled(Command command); final void onCommandRejected(CommandId commandId, Event rejection); final void onDispatchEventToSubscriber(Event event); final void onEventImported(Event event); final void onDispatchEventToReactor(Event event); final void onStateChanged(EntityRecordChange change,
                                     Set<? extends MessageId> messageIds,
                                     Origin origin); final void onRemovedFromStorage(Iterable<MessageId> signalIds); final Optional<Event> onMigrationApplied(); final void onInvalidEntity(MessageId lastMessage,
                                      MessageId root,
                                      ValidationError error,
                                      Version version); final void onDispatchingFailed(SignalEnvelope<?, ?, ?> signal, Error error); void onDuplicateEvent(EventEnvelope event); void onDuplicateCommand(CommandEnvelope command); void onCorruptedState(BatchDispatchOutcome outcome);  }