### Question:
CircularArraySequence implements Sequence { @Override public Object peekHead() { return backingArray[front]; } CircularArraySequence(int size);  CircularArraySequence(CircularArraySequence<T> seq); @Override Object head(); @Override Object last(); @Override Sequence front(); @Override Sequence tail(); @Override Sequence<T> concat(Sequence seq); @Override boolean contains(Sequence subseq); @Override boolean contains(Object element); @Override void append(Object element); @Override void prepend(Object element); @Override boolean isEmpty(); @Override Object peekHead(); @Override Object peekLast(); @Override boolean equals(Sequence seq); @Override int length(); @Override Iterator<T> iterator(); String toString();  }### Answer:
@Test public void testPeekHead() { assertEquals("Peek should return null for empty sequence", null, seq.peekHead()); seq.append("a"); assertEquals("Peeking at head did not return correct value", "a", seq.peekHead()); seq.append("b"); assertEquals("Peeking at head after appending 2 things did not return correct value", "a", seq.peekHead()); seq.prepend("x"); assertEquals("x", seq.peekHead()); }