@Test
    public void testWriteReadByteArray() throws Exception
    {
        // Setup fixture.
        final byte[] input = new byte[] { (byte)0xe0, 0x4d, (byte)0xd0, 0x20, (byte)0xfa, 0x3d, 0x29, 0x13, (byte)0xa2, (byte)0xd8, 0x08, 0x00, 0x2b, (byte) 0x90, 0x39, (byte)0x9d };

        // 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.
xmppserver/src/test/java/org/jivesoftware/util/cache/DefaultExternalizableUtilTest.java