### Question:
CompositeAdjacencyCursor implements AdjacencyCursor { long advance(long target) { for (var cursor : cursors) { cursorQueue.remove(cursor); while (cursor.hasNextVLong() && cursor.peekVLong() < target) { cursor.nextVLong(); } if (cursor.hasNextVLong()) { cursorQueue.add(cursor); } } return cursorQueue.isEmpty() ? AdjacencyCursor.NOT_FOUND : nextVLong(); } CompositeAdjacencyCursor(List<AdjacencyCursor> cursors); List<AdjacencyCursor> cursors(); @Override int size(); @Override boolean hasNextVLong(); @Override long nextVLong(); @Override long peekVLong(); @Override int remaining(); @Override void close();  }### Answer:
@Test void shouldNotReturnLastValueWhenAdvanceExhaustsCursor() { assertEquals(2, adjacencyCursor.advance(2)); }