    @Test
    public void serializerWithEncodingStructuredAndFormat() {

        CloudEventSerializer serializer = new CloudEventSerializer();

        EventFormatProvider.getInstance().registerFormat(CSVFormat.INSTANCE);

        HashMap<String, Object> config = new HashMap<>();
        config.put(CloudEventSerializer.ENCODING_CONFIG, "STRUCTURED");
        config.put(CloudEventSerializer.EVENT_FORMAT_CONFIG, CSVFormat.INSTANCE.serializedContentType());

        assertThatCode(() -> serializer.configure(config, false))
            .doesNotThrowAnyException();

        assertProducesMessagesWithEncoding(serializer, Encoding.STRUCTURED);
    }