TomcatGroupManager extends BaseTomcatManager implements GroupManager,
                                                                     ContextualManager { @Override public List<Group> getAll() throws SecurityManagementException { MemoryUserDatabase userDatabase = getDatabase(); try { Iterator<org.apache.catalina.Role> groupIterator = userDatabase.getRoles(); List<Group> groups = new ArrayList<>(); if (groupIterator != null) { while (groupIterator.hasNext()) { org.apache.catalina.Role group = groupIterator.next(); Group groupname = SecurityManagementUtils.createGroup(group.getRolename()); groups.add(groupname); } } return groups; } finally { closeDatabase(userDatabase); } } TomcatGroupManager();  TomcatGroupManager(final Map<String, String> gitPrefs);  TomcatGroupManager(final ConfigProperties gitPrefs); @Override void initialize(UserSystemManager userSystemManager); @Override void destroy(); @Override SearchResponse<Group> search(SearchRequest request); @Override Group get(String identifier); @Override List<Group> getAll(); @Override Group create(Group entity); @Override Group update(Group entity); @Override void delete(String... identifiers); @Override GroupManagerSettings getSettings(); @Override void assignUsers(String name,
                            Collection<String> users);  }
@Test public void testGetAllGroups() { List<Group> groups = groupsManager.getAll(); assertEquals(groups.size(), 4); }