@Test
public void testReadPatchApplyPlan() throws IOException {

  PatchApplyPlan plan =
      new PatchReader().readPatchApplyPlan(new ByteArrayInputStream(writeTestPatch()));
  Assert.assertEquals(DELTA_FRIENDLY_OLD_FILE_SIZE, plan.getDeltaFriendlyOldFileSize());
  Assert.assertEquals(OLD_DELTA_FRIENDLY_UNCOMPRESS_PLAN, plan.getOldFileUncompressionPlan());
  Assert.assertEquals(
      NEW_DELTA_FRIENDLY_RECOMPRESS_PLAN, plan.getDeltaFriendlyNewFileRecompressionPlan());
  Assert.assertEquals(DELTA_DESCRIPTORS, plan.getDeltaDescriptors());
}