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

        try {
            return serializer.serialize(topic, (Boolean) value);
        } catch (ClassCastException e) {
            throw new DataException("BooleanConverter is not compatible with objects of type " + value.getClass());
        }
    }
@Test
    public void testFromConnectNullValue() {
        assertNull(converter.fromConnectData(TOPIC, Schema.BOOLEAN_SCHEMA, null));
    }