BoundedContext implements Closeable, Logging { public Set<TypeName> stateTypes(Visibility visibility) { Set<TypeName> result = guard.entityStateTypes(visibility); return result; } @SuppressWarnings("ThisEscapedInObjectConstruction") // to inject dependencies. @Internal protected  BoundedContext(BoundedContextBuilder builder); static BoundedContextBuilder singleTenant(String name); static BoundedContextBuilder multitenant(String name); Set<TypeName> stateTypes(Visibility visibility); Set<TypeName> stateTypes(); boolean hasEntitiesOfType(Class<? extends Entity<?, ?>> entityClass); boolean hasEntitiesWithState(Class<? extends EntityState> stateClass); CommandBus commandBus(); EventBus eventBus(); ImportBus importBus(); Stand stand(); BoundedContextName name(); ContextSpec spec(); boolean isMultitenant(); @Internal abstract SystemClient systemClient(); @Override void close(); @Override boolean isOpen(); @Override String toString(); @Internal final InternalAccess internalAccess();  }
@Test @DisplayName("obtain entity types by visibility") void getEntityTypesByVisibility() { assertThat(context.stateTypes(EntityOption.Visibility.FULL)) .isEmpty(); registerAll(); assertThat(context.stateTypes(EntityOption.Visibility.FULL)) .isNotEmpty(); }