@Test
public void nullSchemaPrimitiveToConnect() {

    SchemaAndValue converted = converter.toConnectData(TOPIC, "{ \"schema\": null, \"payload\": null }".getBytes());
    assertEquals(SchemaAndValue.NULL, converted);
    converted = converter.toConnectData(TOPIC, "{ \"schema\": null, \"payload\": true }".getBytes());
    assertEquals(new SchemaAndValue(null, true), converted);
    // Integers: Connect has more data types, and JSON unfortunately mixes all number types. We try to preserve
    // info as best we can, so we always use the largest integer and floating point numbers we can and have Jackson
    // determine if it's an integer or not
    converted = converter.toConnectData(TOPIC, "{ \"schema\": null, \"payload\": 12 }".getBytes());
    assertEquals(new SchemaAndValue(null, 12L), converted);
    converted = converter.toConnectData(TOPIC, "{ \"schema\": null, \"payload\": 12.24 }".getBytes());
    assertEquals(new SchemaAndValue(null, 12.24), converted);
    converted = converter.toConnectData(TOPIC, "{ \"schema\": null, \"payload\": \"a string\" }".getBytes());
    assertEquals(new SchemaAndValue(null, "a string"), converted);
    converted = converter.toConnectData(TOPIC, "{ \"schema\": null, \"payload\": [1, \"2\", 3] }".getBytes());
    assertEquals(new SchemaAndValue(null, Arrays.asList(1L, "2", 3L)), converted);
    converted = converter.toConnectData(TOPIC, "{ \"schema\": null, \"payload\": { \"field1\": 1, \"field2\": 2} }".getBytes());
    Map<String, Long> obj = new HashMap<>();
    obj.put("field1", 1L);
    obj.put("field2", 2L);
    assertEquals(new SchemaAndValue(null, obj), converted);
}