@Test
public void testEffectiveSearch()
throws Exception
{
UserManager userLocator = this.getUserManager();
Set<String> allRoleIds = new HashSet<String>();
for (Role role : this.getSecuritySystem().listRoles()) {
allRoleIds.add(role.getRoleId());
}
UserSearchCriteria criteria = new UserSearchCriteria("j", allRoleIds, null);
Set<User> users = userLocator.searchUsers(criteria);
assertNotNull(this.getById(users, "jvanzyl"));
Assert.assertEquals("Users: " + users, 1, users.size());
}