@Override
    public byte[] toBytes(Object obj) {
        return toBytes(obj, 0, true, globalPartitioningStrategy);
    }
@Test
    public void toBytes_withPadding() {
        String payload = "somepayload";
        int padding = 10;

        byte[] unpadded = abstractSerializationService.toBytes(payload, 0, true);
        byte[] padded = abstractSerializationService.toBytes(payload, 10, true);

        // make sure the size is expected
        assertEquals(unpadded.length + padding, padded.length);

        // check if the actual content is the same
        for (int k = 0; k < unpadded.length; k++) {
            assertEquals(unpadded[k], padded[k + padding]);
        }
    }