@Test
    public void testWriteReadByteArrayEmpty() throws Exception
    {
        // Setup fixture.
        final byte[] input = new byte[0];

        // Execute system under test.
        new DefaultExternalizableUtil().writeByteArray(bus.getDataOutput(), input);
        final byte[] result = new DefaultExternalizableUtil().readByteArray(bus.getDataInput());

        // Verify result.
        assertArrayEquals( input, result );
    }
Asserts that the process of writing and reading a byte array value through the {@link DefaultExternalizableUtil}
implementation results in a value that is equal to the original input, when the array is empty.
xmppserver/src/test/java/org/jivesoftware/util/cache/DefaultExternalizableUtilTest.java