code: public boolean isRegistry(BareJid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          Objects.requireNonNull(jid, "JID argument must not be null");
          // At some point 'usedRegistries' will also contain the registry returned by findRegistry(), but since this is
          // not the case from the beginning, we perform findRegistry().equals(jid) too.
          Jid registry = findRegistry();
          if (jid.equals(registry)) {
              return true;
          }
          if (usedRegistries.contains(jid)) {
              return true;
          }
          return false;
      }
docs: Registry utility methods