protected void assertChangeNotAllowed(String nickToGrant, StanzaErrorCondition expectedError, Affiliation newAffiliation, Role newRole) throws ProtocolException {
// send message to room
IQStanza result = (IQStanza) IQStanza.getWrapper(sendIq(OCCUPANT1_JID, ROOM2_JID, SET, "id1",
NamespaceURIs.XEP0045_MUC_ADMIN, new IqAdminItem(nickToGrant, null, newRole, newAffiliation)));
XMLElementBuilder builder = new XMLElementBuilder("query", NamespaceURIs.XEP0045_MUC_ADMIN).startInnerElement(
"item", NamespaceURIs.XEP0045_MUC_ADMIN).addAttribute("nick", nickToGrant);
if(newAffiliation != null) {
builder.addAttribute("affiliation", newAffiliation.toString());