VisibilityGuard { void shutDownRepositories() { repositories().forEach(Repository::close); repositories.clear(); } private  VisibilityGuard(); Set<TypeName> entityStateTypes(Visibility visibility);  }
@Test @DisplayName("shutdown repositories") void shutdownRepositories() { guard.shutDownRepositories(); for (Repository repository : repositories) { assertFalse(repository.isOpen()); } }