@Override
    public byte[] fromConnectData(String topic, Schema schema, Object value) {
        if (schema != null && schema.type() != Schema.Type.BYTES)
            throw new DataException("Invalid schema type for ByteArrayConverter: " + schema.type().toString());

        if (value != null && !(value instanceof byte[]) && !(value instanceof ByteBuffer))
            throw new DataException("ByteArrayConverter is not compatible with objects of type " + value.getClass());

        return value instanceof ByteBuffer ? getBytesFromByteBuffer((ByteBuffer) value) : (byte[]) value;
    }
@Test
    public void testFromConnectNull() {
        assertNull(converter.fromConnectData(TOPIC, Schema.BYTES_SCHEMA, null));
    }