@Test
public void buildRecordsInvalidHeadersType() throws ValidationException {

    thrown.expect( ValidationException.class );
    thrown.expectMessage("Property 'headers' must be of type JsonObject");
    buildRecords("myTopic", Buffer.buffer("{\"records\": [{\"value\":{},\"headers\": 123}]}"));
}