@Test
public void testLimit_Complex() {

  // A more nuanced test. Here we set up a limit of 600k - big enough to get the largest and the
  // THIRD largest files. The second largest will fail because there isn't enough space after
  // adding the first largest, and the fourth largest will fail because there is not enough space
  // after adding the third largest. Tricky.
  long limit =
      REC_D_400K.getNewEntry().getUncompressedSize()
          + REC_B_200K.getNewEntry().getUncompressedSize();
  TotalRecompressionLimiter limiter = new TotalRecompressionLimiter(limit);
  List<QualifiedRecommendation> expected = new ArrayList<QualifiedRecommendation>();
  expected.add(REC_B_200K);
  expected.add(REC_D_400K);
  expected.addAll(suppressed(REC_A_100K, REC_C_300K));
  expected.addAll(ALL_IGNORED_RECS);
  assertEquivalence(expected, limiter.getModifiedRecommendations(OLD_FILE, NEW_FILE, ALL_RECS));
}