ArrayList<RawModification> mods = new ArrayList<RawModification>();
ArrayList<ByteString> values = new ArrayList<ByteString>();
values.add(ByteString.valueOf("password"));
LDAPAttribute attr = new LDAPAttribute("userPassword", values);
mods.add(new LDAPModification(ModificationType.DELETE, attr));
values = new ArrayList<ByteString>();
values.add(ByteString.valueOf("newPassword"));
attr = new LDAPAttribute("userPassword", values);
mods.add(new LDAPModification(ModificationType.ADD, attr));
ModifyRequestProtocolOp modifyRequest =
new ModifyRequestProtocolOp(
ByteString.valueOf("uid=test.user,o=test"), mods);
message = new LDAPMessage(2, modifyRequest);