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