@Test @DisplayName("require origin") void requireOrigin() { assertThrows(NullPointerException.class, () -> EventFactory.on(Tests.<CommandEnvelope>nullRef(), producerId)); }
public static EventFactory on(MessageEnvelope origin, Any producerId) { checkNotNull(origin); checkNotNull(producerId); EventOrigin eventOrigin = fromAnotherMessage(origin); return new EventFactory(eventOrigin, producerId); }
EventFactory { public static EventFactory on(MessageEnvelope origin, Any producerId) { checkNotNull(origin); checkNotNull(producerId); EventOrigin eventOrigin = fromAnotherMessage(origin); return new EventFactory(eventOrigin, producerId); } }
EventFactory { public static EventFactory on(MessageEnvelope origin, Any producerId) { checkNotNull(origin); checkNotNull(producerId); EventOrigin eventOrigin = fromAnotherMessage(origin); return new EventFactory(eventOrigin, producerId); } protected  EventFactory(EventOrigin origin, Any producerId); }
EventFactory { public static EventFactory on(MessageEnvelope origin, Any producerId) { checkNotNull(origin); checkNotNull(producerId); EventOrigin eventOrigin = fromAnotherMessage(origin); return new EventFactory(eventOrigin, producerId); } protected  EventFactory(EventOrigin origin, Any producerId); static EventFactory on(MessageEnvelope origin, Any producerId); static EventFactory forImport(ActorContext actorContext, Any producerId); Event createEvent(EventMessage message,
                             @Nullable Version version); Event createRejectionEvent(RejectionMessage message,
                                      @Nullable Version version,
                                      RejectionEventContext rejectionContext); }
EventFactory { public static EventFactory on(MessageEnvelope origin, Any producerId) { checkNotNull(origin); checkNotNull(producerId); EventOrigin eventOrigin = fromAnotherMessage(origin); return new EventFactory(eventOrigin, producerId); } protected  EventFactory(EventOrigin origin, Any producerId); static EventFactory on(MessageEnvelope origin, Any producerId); static EventFactory forImport(ActorContext actorContext, Any producerId); Event createEvent(EventMessage message,
                             @Nullable Version version); Event createRejectionEvent(RejectionMessage message,
                                      @Nullable Version version,
                                      RejectionEventContext rejectionContext);  }