code: public Map<EntityBareJid, HostedRoom> getRoomsHostedBy(DomainBareJid serviceName) throws NoResponseException, XMPPErrorException,
                      NotConnectedException, InterruptedException, NotAMucServiceException {
          if (!providesMucService(serviceName)) {
              throw new NotAMucServiceException(serviceName);
          }
          DiscoverItems discoverItems = serviceDiscoveryManager.discoverItems(serviceName);
          List<DiscoverItems.Item> items = discoverItems.getItems();
  
          Map<EntityBareJid, HostedRoom> answer = new HashMap<>(items.size());
          for (DiscoverItems.Item item : items) {
              HostedRoom hostedRoom = new HostedRoom(item);
              HostedRoom previousRoom = answer.put(hostedRoom.getJid(), hostedRoom);
              assert previousRoom == null;
          }
  
          return answer;
      }
docs: Returns a Map of HostedRooms where each HostedRoom has the XMPP address of the room and the room's name.
  Once discovered the rooms hosted by a chat service it is possible to discover more detailed room information or
  join the room.
  
  @param serviceName the service that is hosting the rooms to discover.
  @return a map from the room's address to its HostedRoom information.
  @throws XMPPErrorException
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException
  @throws NotAMucServiceException
  @since 4.3.1