@Test
public void buildRecordsValidWithKeyWithHeaders(TestContext context) throws ValidationException {

    JsonObject payload = buildPayload("someKey",
            new CaseInsensitiveHeaders()
                    .add("header_1", "value_1")
                    .add("header_2", "value_2"));
    final List<KafkaProducerRecord<String, String>> records =
            buildRecords("myTopic", Buffer.buffer(payload.encode()));
    context.assertFalse(records.isEmpty());
    context.assertEquals(1, records.size());
    context.assertEquals("myTopic", records.get(0).topic());
    context.assertEquals("someKey", records.get(0).key());
    context.assertEquals(payload.getJsonArray("records").getJsonObject(0).getJsonObject("value").encode(),
            records.get(0).value());
    context.assertFalse(records.get(0).headers().isEmpty());
    context.assertEquals(2, records.get(0).headers().size());
    context.assertEquals("header_1", records.get(0).headers().get(0).key());
    context.assertEquals("value_1", records.get(0).headers().get(0).value().toString());
    context.assertEquals("header_2", records.get(0).headers().get(1).key());
    context.assertEquals("value_2", records.get(0).headers().get(1).value().toString());
}