@Test
    public void testWriteReadLongIntMap() throws Exception
    {
        // Setup fixture.
        final Map<Long, Integer> input = new HashMap<>();
        input.put( Long.MIN_VALUE, Integer.MAX_VALUE );
        input.put( Long.MAX_VALUE, Integer.MIN_VALUE );

        // Execute system under test.
        new DefaultExternalizableUtil().writeLongIntMap(bus.getDataOutput(), input);
        final Map<Long, Integer> result = new DefaultExternalizableUtil().readLongIntMap(bus.getDataInput());

        // Verify result.
        assertTrue(areEqualLongInt(input, result ));
    }
Asserts that the process of writing and reading a map of Long-to-Integer 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