private static boolean areEqualStrings(Map<String, Set<String>> first, Map<String, Set<String>> second) {
        if (first.size() != second.size()) {
            return false;
        }

        return first.entrySet().stream()
            .allMatch(e -> (e.getValue() == null && second.get(e.getKey()) == null)
                || (e.getValue().equals(second.get(e.getKey()))) );
    }
Checks if two maps are equal.

@param first A map
@param second Another map
@return if both maps are equal, otherwise false.
xmppserver/src/test/java/org/jivesoftware/util/cache/DefaultExternalizableUtilTest.java