@Override
    public int hashCode() {
        return serializer != null ? serializer.hashCode() : 0;
    }
@Test
    public void testAdaptorEqualAndHashCode() {
        ByteArraySerializerAdapter theOther = new ByteArraySerializerAdapter(serializer);
        ByteArraySerializerAdapter theEmptyOne = new ByteArraySerializerAdapter(null);

        assertEquals(adapter, adapter);
        assertEquals(adapter, theOther);
        assertNotEquals(null, adapter);
        assertNotEquals("Not An Adaptor", adapter);
        assertNotEquals(adapter, theEmptyOne);

        assertEquals(adapter.hashCode(), serializer.hashCode());

        assertEquals(0, theEmptyOne.hashCode());
    }