@Test
  public void testDeserializeRaw() {
    MetricsSnapshot snapshot = metricsSnapshot(true);
    MetricsSnapshotSerde serde = new MetricsSnapshotSerde();
    assertEquals(snapshot, serde.fromBytes(expectedSeralizedSnapshot(true, false).getBytes(StandardCharsets.UTF_8)));
    assertEquals(snapshot, serde.fromBytes(expectedSeralizedSnapshot(true, true).getBytes(StandardCharsets.UTF_8)));
  }
Helps for verifying compatibility when schemas evolve.

Maps have non-deterministic ordering when serialized, so it is difficult to check exact serialized results. It
isn't really necessary to check the serialized results anyways. We just need to make sure serialized data can be
read by old and new systems.
samza-core/src/test/java/org/apache/samza/serializers/TestMetricsSnapshotSerde.java