String adminUserDn = "uid=admin,ou=system";
connection.bind( adminUserDn, "secret" );
// now modify the password for akarasulu (while we're admin)
ModifyRequest modReq = new ModifyRequest( new DN( userDn ) );
modReq.replace( "userPassword", "newpwd" );
connection.modify( modReq );
connection.close();
connection.bind( userDn, "test" );
assertFalse( connection.isAuthenticated() );