Serializer { protected abstract byte[] serializeBytes(); Serializer(); final byte[] serialize(); ByteArrayOutputStream getOutputStream();  }
@Test public void testSerializeBytes() { serializer.serializeBytes(); byte[] result = serializer.getAlreadySerialized(); assertArrayEquals(result, new byte[] { 0, 1, 2, 3, }); }