@Test
  public void testDeserializeRawEmptySamzaEpochIdInHeader() {
    MetricsSnapshot snapshot = metricsSnapshot(false);
    MetricsSnapshotSerde serde = new MetricsSnapshotSerde();
    assertEquals(snapshot, serde.fromBytes(expectedSeralizedSnapshot(false, false).getBytes(StandardCharsets.UTF_8)));
    assertEquals(snapshot, serde.fromBytes(expectedSeralizedSnapshot(false, true).getBytes(StandardCharsets.UTF_8)));
  }
Helps for verifying compatibility when schemas evolve.
samza-core/src/test/java/org/apache/samza/serializers/TestMetricsSnapshotSerde.java