@Test
    public void testCacheSchemaToJsonConversion() {
        assertEquals(0, converter.sizeOfFromConnectSchemaCache());

        // Repeated conversion of the same schema, even if the schema object is different should return the same Java
        // object
        converter.fromConnectData(TOPIC, SchemaBuilder.bool().build(), true);
        assertEquals(1, converter.sizeOfFromConnectSchemaCache());

        converter.fromConnectData(TOPIC, SchemaBuilder.bool().build(), true);
        assertEquals(1, converter.sizeOfFromConnectSchemaCache());

        // Validate that a similar, but different schema correctly returns a different schema.
        converter.fromConnectData(TOPIC, SchemaBuilder.bool().optional().build(), true);
        assertEquals(2, converter.sizeOfFromConnectSchemaCache());
    }
When schemas are disabled, fields are mapped to Connect maps.
connect/json/src/test/java/org/apache/kafka/connect/json/JsonConverterTest.java