void () { final StringBuilder sb = new StringBuilder(); for (int i = 0; i < 20; i++) { sb.append(i + 1).append('\n'); } final GenericPatchApplier gap = new GenericPatchApplier(sb.toString(), Collections.emptyList()); final List<String> strings = Arrays.asList("5", "6", "7"); // coincidence gap.putCutIntoTransformations(new TextRange(4, 6), new GenericPatchApplier.MyAppliedData(strings, true, true, true, GenericPatchApplier.ChangeType.REPLACE)); final TreeMap<TextRange,GenericPatchApplier.MyAppliedData> transformations = gap.getTransformations(); Assert.assertTrue(transformations.isEmpty()); Assert.assertEquals(ApplyPatchStatus.ALREADY_APPLIED, gap.getStatus()); }