@Test
    public void testWriteReadStringsMap() throws Exception
    {
        // Setup fixture.
        final Map<String, Set<String>> input = new HashMap<>();
        final Set<String> firstSet = new HashSet<>();
        firstSet.add("\uD834\uDD1E");
        firstSet.add("foo bar");
        input.put("bar", firstSet);

        final Set<String> secondSet = new HashSet<>();
        secondSet.add("bar");
        secondSet.add("foo");
        input.put("\uD834\uDD1E", secondSet);

        // Execute system under test.
        new DefaultExternalizableUtil().writeStringsMap(bus.getDataOutput(), input);
        final Map<String, Set<String>> result = new HashMap<>();
        final int reportedCount = new DefaultExternalizableUtil().readStringsMap(bus.getDataInput(), result);

        // Verify result.
        assertEquals(2, reportedCount);
        assertTrue(areEqualStrings(input, result));
    }
Asserts that the process of writing and reading a map of a Set of Strings through the {@link DefaultExternalizableUtil}
implementation results in a value that is equal to the original input.
xmppserver/src/test/java/org/jivesoftware/util/cache/DefaultExternalizableUtilTest.java