@Test
public void structToConnect() {

    byte[] structJson = "{ \"schema\": { \"type\": \"struct\", \"fields\": [{ \"field\": \"field1\", \"type\": \"boolean\" }, { \"field\": \"field2\", \"type\": \"string\" }] }, \"payload\": { \"field1\": true, \"field2\": \"string\" } }".getBytes();
    Schema expectedSchema = SchemaBuilder.struct().field("field1", Schema.BOOLEAN_SCHEMA).field("field2", Schema.STRING_SCHEMA).build();
    Struct expected = new Struct(expectedSchema).put("field1", true).put("field2", "string");
    SchemaAndValue converted = converter.toConnectData(TOPIC, structJson);
    assertEquals(new SchemaAndValue(expectedSchema, expected), converted);
}