@Override
    public byte[] serialize(final String topic, final TimestampedKeyAndJoinSide<K> data) {
        final byte boolByte = (byte) (data.isLeftSide() ? 1 : 0);
        final byte[] keyBytes = keySerializer.serialize(topic, data.getKey());
        final byte[] timestampBytes = timestampSerializer.serialize(topic, data.getTimestamp());

        return ByteBuffer
            .allocate(timestampBytes.length + 1 + keyBytes.length)
            .put(timestampBytes)
            .put(boolByte)
            .put(keyBytes)
            .array();
    }
@Test
    public void shouldSerializeKeyWithJoinSideAsFalse() {
        final String value = "some-string";

        final TimestampedKeyAndJoinSide<String> timestampedKeyAndJoinSide = TimestampedKeyAndJoinSide.makeRight(value, 20);

        final byte[] serialized =
            STRING_SERDE.serializer().serialize(TOPIC, timestampedKeyAndJoinSide);

        assertThat(serialized, is(notNullValue()));

        final TimestampedKeyAndJoinSide<String> deserialized =
            STRING_SERDE.deserializer().deserialize(TOPIC, serialized);

        assertThat(deserialized, is(timestampedKeyAndJoinSide));
    }