LineMapper { void appendInsert(int numLines) { int origLineB = lineB; lineB += numLines; int bAheadOfA = lineB - lineA; lineMapAtoB.add(new LineGap(lineA, -1, bAheadOfA)); lineMapBtoA.add(new LineGap(origLineB, lineB - 1, -bAheadOfA)); } LineMapper();   }
@Test public void appendInsert() { LineMapper mapper = new LineMapper(); mapper.appendInsert(10); assertEquals(0, mapper.getLineA()); assertEquals(10, mapper.getLineB()); }