@Test
public void testToArray() {

  IntList intList = new IntList();
  assertEqualArray(intList.toArray());
  assertSame(intList, intList.add(1));
  assertSame(intList, intList.add(2));
  assertEqualArray(intList.toArray(), 1, 2);
}