public static List<MUCRoomSearchInfo> sortByUserAmount( List<MUCRoomSearchInfo> mucs )
    {
        Log.trace( "Sorting by occupant count." );
        mucs.sort( Comparator.comparing(MUCRoomSearchInfo::getOccupantsCount).reversed().thenComparing(MUCRoomSearchInfo::getJID) );
        return mucs;
    }
Sorts the provided list in such a way that the MUC with the most users
will be the first one in the list. Rooms with equal amounts of users
are ordered by JID.

@param mucs The unordered list that will be sorted.
@return The sorted list of MUC rooms.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQExtendedChannelSearchHandler.java