// Check whether a simple participant can kick a room owner or not
muc2.kickParticipant("testbot", "Because I'm bad");
fail("User2 was able to kick a room owner");
}
catch (XMPPException e) {
XMPPError xmppError = e.getXMPPError();
assertNotNull("No XMPPError was received when kicking a room owner", xmppError);
assertEquals(
"A simple participant was able to kick another participant from the room",
403,
xmppError.getCode());
}
// Check that the room's owner can kick a simple participant
muc.kickParticipant("testbot2", "Because I'm the owner");
Thread.sleep(300);