AggregateRepository extends Repository<I, A> implements CommandDispatcher, EventProducingRepository, EventDispatcherDelegate { private Optional<MirrorRepository> mirrorRepository() { Optional<MirrorRepository> result = context().systemClient() .systemRepositoryFor(Mirror.class) .map(MirrorRepository.class::cast); return result; } protected  AggregateRepository(); @Override @OverridingMethodsMustInvokeSuper void registerWith(BoundedContext context); @Override final EventBus eventBus(); @Override A create(I id); @Override final ImmutableSet<CommandClass> messageClasses(); @Override final void dispatch(CommandEnvelope cmd); @Override ImmutableSet<EventClass> events(); @Override ImmutableSet<EventClass> domesticEvents(); @Override ImmutableSet<EventClass> externalEvents(); ImmutableSet<EventClass> importableEvents(); @Override ImmutableSet<EventClass> outgoingEvents(); @Override void dispatchEvent(EventEnvelope event); @Override Optional<A> find(I id); @OverridingMethodsMustInvokeSuper @Override void close();  }
@Test @DisplayName("register self among mirrored types in `MirrorRepository`") void registerAsMirroredType() { MirrorRepository mirrorRepository = mirrorRepository(context()); TypeUrl type = TypeUrl.of(Project.class); assertThat(mirrorRepository.isMirroring(type)).isTrue(); }