### Question:
LdapSyncRequest { public void addPrincipalNames(Set<String> principalNames) { this.principalNames.addAll(principalNames); } LdapSyncRequest(LdapSyncSpecEntity.SyncType type, Set<String> principalNames);  LdapSyncRequest(LdapSyncSpecEntity.SyncType type); void addPrincipalNames(Set<String> principalNames); Set<String> getPrincipalNames(); LdapSyncSpecEntity.SyncType getType();  }### Answer:
@Test public void testAddPrincipalNames() throws Exception { Set<String> names = new HashSet<>(); names.add("name1"); LdapSyncRequest request = new LdapSyncRequest(LdapSyncSpecEntity.SyncType.SPECIFIC,names); names = new HashSet<>(); names.add("name2"); names.add("name3"); request.addPrincipalNames(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")); }