@Test @DisplayName("check that its `ProcessManager` class is subscribed to at least one message") void notRegisterIfSubscribedToNothing() { SensoryDeprivedPmRepository repo = new SensoryDeprivedPmRepository(); BoundedContext context = BoundedContextBuilder .assumingTests() .build(); assertThrows(IllegalStateException.class, () -> repo.registerWith(context)); }
@Override @OverridingMethodsMustInvokeSuper public void registerWith(BoundedContext context) { super.registerWith(context); setupCommandRouting(commandRouting()); checkNotDeaf(); initCache(context.isMultitenant()); initInbox(); }
ProcessManagerRepository extends EventDispatchingRepository<I, P, S> implements CommandDispatcherDelegate, EventProducingRepository { @Override @OverridingMethodsMustInvokeSuper public void registerWith(BoundedContext context) { super.registerWith(context); setupCommandRouting(commandRouting()); checkNotDeaf(); initCache(context.isMultitenant()); initInbox(); } }
ProcessManagerRepository extends EventDispatchingRepository<I, P, S> implements CommandDispatcherDelegate, EventProducingRepository { @Override @OverridingMethodsMustInvokeSuper public void registerWith(BoundedContext context) { super.registerWith(context); setupCommandRouting(commandRouting()); checkNotDeaf(); initCache(context.isMultitenant()); initInbox(); } protected  ProcessManagerRepository(); }
ProcessManagerRepository extends EventDispatchingRepository<I, P, S> implements CommandDispatcherDelegate, EventProducingRepository { @Override @OverridingMethodsMustInvokeSuper public void registerWith(BoundedContext context) { super.registerWith(context); setupCommandRouting(commandRouting()); checkNotDeaf(); initCache(context.isMultitenant()); initInbox(); } protected  ProcessManagerRepository(); @Override @OverridingMethodsMustInvokeSuper void registerWith(BoundedContext context); @Override final EventBus eventBus(); @Override final ImmutableSet<EventClass> messageClasses(); @Override final ImmutableSet<EventClass> domesticEventClasses(); @Override final ImmutableSet<EventClass> externalEventClasses(); @Override final ImmutableSet<CommandClass> commandClasses(); @Override ImmutableSet<EventClass> outgoingEvents(); @Override final void dispatchCommand(CommandEnvelope command); @OverridingMethodsMustInvokeSuper @Override P create(I id); @Override final void store(P entity); @OverridingMethodsMustInvokeSuper @Override void close(); }
ProcessManagerRepository extends EventDispatchingRepository<I, P, S> implements CommandDispatcherDelegate, EventProducingRepository { @Override @OverridingMethodsMustInvokeSuper public void registerWith(BoundedContext context) { super.registerWith(context); setupCommandRouting(commandRouting()); checkNotDeaf(); initCache(context.isMultitenant()); initInbox(); } protected  ProcessManagerRepository(); @Override @OverridingMethodsMustInvokeSuper void registerWith(BoundedContext context); @Override final EventBus eventBus(); @Override final ImmutableSet<EventClass> messageClasses(); @Override final ImmutableSet<EventClass> domesticEventClasses(); @Override final ImmutableSet<EventClass> externalEventClasses(); @Override final ImmutableSet<CommandClass> commandClasses(); @Override ImmutableSet<EventClass> outgoingEvents(); @Override final void dispatchCommand(CommandEnvelope command); @OverridingMethodsMustInvokeSuper @Override P create(I id); @Override final void store(P entity); @OverridingMethodsMustInvokeSuper @Override void close();  }