for (LdapUserDTO user : userListResponse.getData()) {
userMap.put(user.getUserId(), user);
}
// now check everybody
LdapUserDTO cstamas = userMap.get("cstamas");
Assert.assertEquals("Tamas Cservenak", cstamas.getName());
Assert.assertEquals("cstamas@sonatype.com", cstamas.getEmail());
Assert.assertEquals(2, cstamas.getRoles().size());
Assert.assertTrue(cstamas.getRoles().contains("public"));
Assert.assertTrue(cstamas.getRoles().contains("snapshots"));
LdapUserDTO brianf = userMap.get("brianf");
Assert.assertEquals("Brian Fox", brianf.getName());
Assert.assertEquals("brianf@sonatype.com", brianf.getEmail());
Assert.assertEquals(2, brianf.getRoles().size());
Assert.assertTrue(brianf.getRoles().contains("public"));
Assert.assertTrue(brianf.getRoles().contains("releases"));
LdapUserDTO jvanzyl = userMap.get("jvanzyl");
Assert.assertEquals("Jason Van Zyl", jvanzyl.getName());
Assert.assertEquals("jvanzyl@sonatype.com", jvanzyl.getEmail());
Assert.assertEquals(3, jvanzyl.getRoles().size());
Assert.assertTrue(jvanzyl.getRoles().contains("public"));
Assert.assertTrue(jvanzyl.getRoles().contains("snapshots"));
Assert.assertTrue(jvanzyl.getRoles().contains("releases"));
}