@Test
public void testPrepareForDiffing_OneCompressedEntry_Changed_Limited() throws IOException {

  // Like above, but this time limited by a TotalRecompressionLimiter that will prevent the
  // uncompression of the resources.
  byte[] oldBytes = UnitTestZipArchive.makeTestZip(Collections.singletonList(ENTRY_LEVEL_6));
  File oldFile = store(oldBytes);
  byte[] newBytes = UnitTestZipArchive.makeTestZip(Collections.singletonList(ENTRY_LEVEL_9));
  File newFile = store(newBytes);
  TotalRecompressionLimiter limiter = new TotalRecompressionLimiter(1); // 1 byte limitation
  PreDiffExecutor executor =
      new PreDiffExecutor.Builder()
          .readingOriginalFiles(oldFile, newFile)
          .writingDeltaFriendlyFiles(deltaFriendlyOldFile, deltaFriendlyNewFile)
          .withRecommendationModifier(limiter)
          .build();
  PreDiffPlan plan = executor.prepareForDiffing();
  Assert.assertNotNull(plan);
  // The plan should be to leave everything alone because of the limiter
  Assert.assertTrue(plan.getOldFileUncompressionPlan().isEmpty());
  Assert.assertTrue(plan.getNewFileUncompressionPlan().isEmpty());
  Assert.assertTrue(plan.getDeltaFriendlyNewFileRecompressionPlan().isEmpty());
  // Because nothing has changed, the delta-friendly files should be exact matches for the
  // original files.
  assertFileEquals(oldFile, deltaFriendlyOldFile);
  assertFileEquals(newFile, deltaFriendlyNewFile);
}