DBUserGroupCallbackImpl extends AbstractUserGroupInfo implements UserGroupCallback { public boolean existsGroup(String groupId) { if (groupId == null) { throw new IllegalArgumentException("GroupId cannot be null"); } return checkExistence(this.config.getProperty(ROLES_QUERY), groupId); } DBUserGroupCallbackImpl(boolean activate);  DBUserGroupCallbackImpl(Properties config); boolean existsUser(String userId); boolean existsGroup(String groupId); List<String> getGroupsForUser(String userId); static final String DS_JNDI_NAME; static final String PRINCIPAL_QUERY; static final String USER_ROLES_QUERY; static final String ROLES_QUERY; }
@Test public void testGroupExists() { boolean exists = callback.existsGroup("PM"); assertTrue(exists); }
@Test public void testGroupNotExists() { boolean exists = callback.existsGroup("HR"); assertFalse(exists); }