Occupant requestor = room.addOccupant(OCCUPANT2_JID, "Nick 2");
requestor.setRole(Role.Visitor);
DataForm form = new DataForm();
form.setType(submit);
form.addField(new Field(null, null, "FORM_TYPE", NamespaceURIs.XEP0045_MUC_REQUEST));
form.addField(new Field(null, null, "muc#role", "participant"));
form.addField(new Field(null, null, "muc#jid", OCCUPANT2_JID.getFullQualifiedName()));
form.addField(new Field(null, null, "muc#roomnick", "Nick 2"));
form.addField(new Field(null, null, "muc#request_allow", "true"));
sendMessage(OCCUPANT1_JID, ROOM1_JID, new DataFormEncoder().getXML(form));
assertEquals(Role.Participant, room.findOccupantByNick("Nick 2").getRole());