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("6", "7"); // coincidence gap.putCutIntoTransformations(new TextRange(3, 6), new GenericPatchApplier.MyAppliedData(strings, true, true, true, GenericPatchApplier.ChangeType.REPLACE)); final TreeMap<TextRange,GenericPatchApplier.MyAppliedData> transformations = gap.getTransformations(); Assert.assertFalse(transformations.isEmpty()); Assert.assertEquals(1, transformations.size()); final Map.Entry<TextRange, GenericPatchApplier.MyAppliedData> entry = transformations.entrySet().iterator().next(); final TextRange key = entry.getKey(); Assert.assertTrue(key.getStartOffset() == 3 && key.getEndOffset() == 4); final List<String> list = entry.getValue().getList(); Assert.assertEquals(0, list.size()); }