docs: public synchronized void changeNickname(Resourcepart nickname) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, MucNotJoinedException  {
          Objects.requireNonNull(nickname, "Nickname must not be null or blank.");
          // Check that we already have joined the room before attempting to change the
          // nickname.
          if (!joined) {
              throw new MucNotJoinedException(this);
          }
          final EntityFullJid jid = JidCreate.entityFullFrom(room, nickname);
          // We change the nickname by sending a presence packet where the "to"
          // field is in the form "roomName@service/nickname"
          // We don't have to signal the MUC support again
          Presence joinPresence = new Presence(Presence.Type.available);
          joinPresence.setTo(jid);
  
          // Wait for a presence packet back from the server.
          StanzaFilter responseFilter =
              new AndFilter(
                  FromMatchesFilter.createFull(jid),
                  new StanzaTypeFilter(Presence.class));
          StanzaCollector response = connection.createStanzaCollectorAndSend(responseFilter, joinPresence);
          // Wait up to a certain number of seconds for a reply. If there is a negative reply, an
          // exception will be thrown
          response.nextResultOrThrow();
  
          // TODO: Shouldn't this handle nickname rewriting by the MUC service?
          setNickname(nickname);
      }