@Test
public void testSlowDiskInfoPBHelper() {

  // Test with a map that has a few slow disk entries.
  final SlowDiskReports slowDisks = SlowDiskReports.create(
      ImmutableMap.of(
          "disk1", ImmutableMap.of(SlowDiskReports.DiskOp.METADATA, 0.5),
          "disk2", ImmutableMap.of(SlowDiskReports.DiskOp.READ, 1.0,
              SlowDiskReports.DiskOp.WRITE, 1.0),
          "disk3", ImmutableMap.of(SlowDiskReports.DiskOp.METADATA, 1.2,
              SlowDiskReports.DiskOp.READ, 1.5,
              SlowDiskReports.DiskOp.WRITE, 1.3)));
  SlowDiskReports slowDisksConverted1 = PBHelper.convertSlowDiskInfo(
      PBHelper.convertSlowDiskInfo(slowDisks));
  assertTrue(
      "Expected map:" + slowDisks + ", got map:" +
          slowDisksConverted1.getSlowDisks(),
      slowDisksConverted1.equals(slowDisks));
  // Test with an empty map
  SlowDiskReports slowDisksConverted2 = PBHelper.convertSlowDiskInfo(
      PBHelper.convertSlowDiskInfo(SlowDiskReports.EMPTY_REPORT));
  assertTrue(
      "Expected empty map:" + ", got map:" + slowDisksConverted2,
      slowDisksConverted2.equals(SlowDiskReports.EMPTY_REPORT));
}