@Test
public void testSerializedDataIncludesAvroSchema() throws IOException {

  // Given
  GenericContainer anyValidRecord = new User("anyName");
  AvroDeserializer decoder = new AvroDeserializer();
  AvroSerializer encoder = new AvroSerializer();
  // When
  byte[] serializedRecord = encoder.serialize(anyValidRecord);
  // Then
  GenericContainer[] decodedRecords =
      decoder.deserialize(anyValidRecord.getSchema(), serializedRecord);
  assertThat(decodedRecords.length).isEqualTo(1);
  assertThat(anyValidRecord.getSchema()).isEqualTo(decodedRecords[0].getSchema());
}