TomcatGroupManager extends BaseTomcatManager implements GroupManager,
                                                                     ContextualManager { @Override public SearchResponse<Group> search(SearchRequest request) throws SecurityManagementException { List<Group> groups = getAll(); return groupsSearchEngine.search(groups, request); } 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(expected = RuntimeException.class) public void testSearchPageZero() { AbstractEntityManager.SearchRequest request = buildSearchRequestMock("", 0, 5); AbstractEntityManager.SearchResponse<Group> response = groupsManager.search(request); }
@Test public void testSearchAll() { AbstractEntityManager.SearchRequest request = buildSearchRequestMock("", 1, 5); AbstractEntityManager.SearchResponse<Group> response = groupsManager.search(request); assertNotNull(response); List<Group> groups = response.getResults(); int total = response.getTotal(); boolean hasNextPage = response.hasNextPage(); assertEquals(total, 4); assertTrue(!hasNextPage); assertEquals(groups.size(), 4); List<Group> expectedGroups = createGroupList(ADMIN, "role3", "role2", "role1"); assertEquals(new HashSet<Group>(expectedGroups), new HashSet<Group>(groups)); }