LdapSyncRequest { public Set<String> getPrincipalNames() { return principalNames; } LdapSyncRequest(LdapSyncSpecEntity.SyncType type, Set<String> principalNames);  LdapSyncRequest(LdapSyncSpecEntity.SyncType type); void addPrincipalNames(Set<String> principalNames); Set<String> getPrincipalNames(); LdapSyncSpecEntity.SyncType getType();  }
@Test public void testGetPrincipalNames() throws Exception { Set<String> names = new HashSet<String>(); names.add("name1"); names.add("name2"); names.add("name3"); LdapSyncRequest request = new LdapSyncRequest(LdapSyncSpecEntity.SyncType.SPECIFIC,names); Set<String> principalNames = request.getPrincipalNames(); Assert.assertEquals(3, principalNames.size()); Assert.assertTrue(principalNames.contains("name1")); Assert.assertTrue(principalNames.contains("name2")); Assert.assertTrue(principalNames.contains("name3")); }