KeyCloakGroupManager extends BaseKeyCloakManager implements GroupManager,
                                                                         ContextualManager { @Override public SearchResponse<Group> search(SearchRequest request) throws SecurityManagementException { if (request.getPage() <= 0) { throw new RuntimeException("First page must be 1."); } final List<Group> roles = getAll(); return groupsSearchEngine.search(roles, request); } KeyCloakGroupManager(); @Override void initialize(UserSystemManager userSystemManager); @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); @Override void destroy();  }
@Test(expected = RuntimeException.class) public void testSearchPageZero() { AbstractEntityManager.SearchRequest request = buildSearchRequestMock("", 0, 5); AbstractEntityManager.SearchResponse<Group> response = groupsManager.search(request); }