### Question:
ListSequence implements Sequence<T> { @Override public T next(T item) { return stepFrom(item, ONE_FORWARD); } @SafeVarargs  ListSequence(T... items);  ListSequence(List<T> aList); @Override T previous(T item); @Override T next(T item);  }### Answer:
@Test public void testNext() { final String message = "next() should return the next item in the sequence"; assertEquals(message, "b", sequence.next("a")); assertEquals(message, "c", sequence.next("b")); assertNull("next() should return null for last item", sequence.next("c")); }
@Test(expected = IllegalArgumentException.class) public void testNextRejectsAnyArgumentNotInTheSequence() { sequence.next("x"); }