final String baseDN,
final String authDN,
final String authPassword,
final String ldifFile) throws LDAPException, IOException {
final InMemoryListenerConfig listenerConfig = InMemoryListenerConfig.createLDAPConfig("default", port);
final InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(new DN(baseDN));
config.setListenerConfigs(listenerConfig);
config.addAdditionalBindCredentials(authDN, authPassword);
final InMemoryDirectoryServer server = new InMemoryDirectoryServer(config);
server.add(new Entry(baseDN, new Attribute("objectclass", "domain", "top")));
loadData(server, ldifFile);