source: class PatchExplainerTest {
  
    private static final UnitTestZipEntry ENTRY_A1_LEVEL_6;
    private static final UnitTestZipEntry ENTRY_A1_LEVEL_9;
    private static final UnitTestZipEntry ENTRY_A1_STORED;
    private static final UnitTestZipEntry ENTRY_A2_LEVEL_9;
    private static final UnitTestZipEntry ENTRY_A2_STORED;
    private static final UnitTestZipEntry ENTRY_B_LEVEL_6;
    private File oldFile;
    private File newFile;
  
    @Test
    public void testExplainPatch_NewFile() throws Exception {
  
target:     byte[] oldBytes = UnitTestZipArchive.makeTestZip(Collections.singletonList(ENTRY_A1_LEVEL_6));
      byte[] newBytes = UnitTestZipArchive.makeTestZip(Collections.singletonList(ENTRY_B_LEVEL_6));
      save(oldBytes, oldFile);
      save(newBytes, newFile);
      FakeCompressor fakeCompressor =
          new FakeCompressor(ENTRY_B_LEVEL_6.getCompressedBinaryContent());
      PatchExplainer explainer = new PatchExplainer(fakeCompressor, null);
      List<EntryExplanation> explanations = explainer.explainPatch(oldFile, newFile);
      EntryExplanation expected =
          new EntryExplanation(
              path(ENTRY_B_LEVEL_6),
              true, // isNew
              null, // recommendation reason (null because the file is new)
              FakeCompressor.OUTPUT.length());
      checkExplanation(explanations, expected);
    }
  
  }