LdapConnectionConfig config = new LdapConnectionConfig();
config.setLdapHost( "localhost" );
config.setLdapPort( ldapServer.getPort() );
config.setName( ServerDNConstants.ADMIN_SYSTEM_DN );
config.setCredentials( "secret" );
config.setBinaryAttributeDetector( new DefaultConfigurableBinaryAttributeDetector() );
LdapConnection myConnection = new LdapNetworkConnection( config );
// Remove the UserPassword from the list
( ( ConfigurableBinaryAttributeDetector ) config.getBinaryAttributeDetector() ).