private void doTest(float ageWeight, float sizeWeight) {
    ScoreBasedEvictionComparatorSupplier supplier =
        new ScoreBasedEvictionComparatorSupplier(ageWeight, sizeWeight);
    Collections.sort(entries, supplier.get());

    for (int i = 0; i < entries.size() - 1; i++) {
      assertTrue(
          supplier.calculateScore(entries.get(i), 0)
              > supplier.calculateScore(entries.get(i + 1), 0));
    }
  }
Test for the score-based eviction comparator.
imagepipeline-base/src/test/java/com/facebook/cache/disk/ScoreBasedEvictionComparatorSupplierTest.java