@Test
public void parseCompactionStatsTest() throws IOException {

  final ObjectMapper objectMapper = new ObjectMapper();
  Compaction compaction = Compaction.builder()
      .withId("foo")
      .withKeyspace("ks")
      .withTable("t")
      .withProgress(64L)
      .withTotal(128L)
      .withType("Validation")
      .withUnit("unit")
      .build();
  CompactionStats originalCompactionStats = CompactionStats.builder()
      .withActiveCompactions(ImmutableList.of(compaction))
      .withPendingCompactions(42)
      .build();
  String compactionJson = objectMapper.writeValueAsString(originalCompactionStats);
  CompactionStats compactionStats = ClusterFacade.parseCompactionStats(compactionJson);
  assertEquals(42L, compactionStats.getPendingCompactions().longValue());
}