public double getMaxCompactionScore() {
        return partitionStatisticsHashMap.values().stream().mapToDouble(stat -> stat.getCompactionScore().getMax())
                .max().orElse(0);
    }
@Test
    public void testGetMaxCompactionScore() {
        double delta = 0.001;

        CompactionMgr compactionMgr = new CompactionMgr();
        PartitionIdentifier partition1 = new PartitionIdentifier(1, 2, 3);
        PartitionIdentifier partition2 = new PartitionIdentifier(1, 2, 4);
        Assert.assertEquals(0, compactionMgr.getMaxCompactionScore(), delta);

        compactionMgr.handleLoadingFinished(partition1, 2, System.currentTimeMillis(),
                Quantiles.compute(Lists.newArrayList(1d)));
        Assert.assertEquals(1, compactionMgr.getMaxCompactionScore(), delta);
        compactionMgr.handleCompactionFinished(partition1, 3, System.currentTimeMillis(),
                Quantiles.compute(Lists.newArrayList(2d)));
        Assert.assertEquals(2, compactionMgr.getMaxCompactionScore(), delta);

        compactionMgr.handleLoadingFinished(partition2, 2, System.currentTimeMillis(),
                Quantiles.compute(Lists.newArrayList(3d)));
        Assert.assertEquals(3, compactionMgr.getMaxCompactionScore(), delta);

        compactionMgr.removePartition(partition2);
        Assert.assertEquals(2, compactionMgr.getMaxCompactionScore(), delta);
    }