@Test
@SuppressWarnings("unchecked")
public void testFindUsers() {

  List<User> users = IteratorUtils.toList(directory.findUsers("%mple%", 0, 0));
  Assert.assertEquals(2, users.size());
  Assert.assertTrue(userName.equals(users.get(0).getUsername()) || userName.equals(users.get(1).getUsername()));
  Assert.assertTrue("userSample".equals(users.get(0).getUsername())
          || "userSample".equals(users.get(1).getUsername()));
  // Test limit and offset
  users = IteratorUtils.toList(directory.findUsers("%mple%", 1, 1));
  Assert.assertEquals(1, users.size());
}