void (final long earlyRevision, final List<Long> internally, final List<Long> committed, final List<Fragment> fragments, final int step) { final List<Long> expectedRevisions = new ArrayList<>(); int pageStep = PAGE * step; for (long i = earlyRevision; i > (earlyRevision - pageStep); i -= step) { expectedRevisions.add(i); } for (Fragment fragment : fragments) { final Origin currentOrigin = fragment.getOrigin(); for (CommittedChangeList list : fragment.getList()) { assert ! expectedRevisions.isEmpty(); final long expected = expectedRevisions.remove(0); assert expected == list.getNumber(); assert (Origin.INTERNAL.equals(currentOrigin) && (internally.contains(expected))) || (Origin.VISUAL.equals(currentOrigin) && (committed.contains(expected))) || (Origin.LIVE.equals(currentOrigin) && (! internally.contains(expected)) && (! committed.contains(expected))); } } }