@Test
public void validSchemaAndData() {

  Schema schema = SchemaBuilder.record("r").fields().name("int8").type().intType().noDefault().endRecord();
  Record record = new Record(schema);
  record.put("int8", 2);
  int version = 1;
  when(schemaLookup.getSchema(1)).thenReturn(schema);
  byte[] value = toAvroBinary(schema, record, version);
  Record result = underTest.deserialize(TOPIC, value);
  assertThat(result.getSchema(), is(schema));
  assertThat(result, is(record));
}