    @Test
    public void shouldSerializeAvroToJsonGivenGenericRecord() throws IOException {


        Schema.Parser parser = new Schema.Parser();
        Schema schema = parser.parse(SCHEMA);
        GenericRecord record = new GenericData.Record(schema);
        record.put("name", "kafka");
        record.put("created", NOW.toEpochMilli());

        Writer jsonWriter = new StringWriter();
        JsonGenerator jsonGenerator = new JsonFactory().createGenerator(jsonWriter);
        SerializerProvider serializerProvider = new ObjectMapper().getSerializerProvider();
        new GenericRecordSerializer().serialize(record, jsonGenerator, serializerProvider);
        jsonGenerator.flush();
        Assertions.assertEquals(
                "{\"name\":\"kafka\",\"created\":" + NOW.toEpochMilli() + "}"
                , jsonWriter.toString());
    }