final InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(new DN(getRoot()));
config.setListenerConfigs(listenerConfig);
if (getAuthDn() != null) {
config.addAdditionalBindCredentials(getAuthDn(), getPasswd());
}
server = new InMemoryDirectoryServer(config);
server.add(new Entry(getRoot(), new Attribute("objectclass", "domain", "top")));
if (getLdifFile() != null) {
final InputStream in = new FileInputStream(getLdifFile());
try {
final LDIFReader reader = new LDIFReader(in);