getTypedItemMapper().addClass(LdapDomain.class);
}
@Test
public void testCreateAndDeleteItem() throws Exception {
OpenLdapTestHelpers openLdap = new OpenLdapTestHelpers(getContext());
LdapService ldapService = openLdap.createLdapServer();
InetSocketAddress socketAddress = getUniqueEndpoint(ldapService);
Assert.assertFalse(isPortOpen(socketAddress));
openFirewall(ldapService, LdapServiceController.PORT);
Assert.assertTrue(isPortOpen(socketAddress));
String organizationName = "test.platformlayer.org";
LdapDomain ldapDomain = openLdap.createLdapDomain(ldapService, organizationName);
// TODO: Make endpoint ldap://<ip>:<port>/ ???
String ldapUrl = "ldap://" + socketAddress.getAddress().getHostAddress() + ":" + socketAddress.getPort() + "/";
testLdap(ldapUrl, ldapDomain.adminPassword);
}