private void checkRemove() throws Exception {
   ArrayList4<Integer> list = retrieveAndAssertNullArrayList4();
   Assert.areEqual(ArrayList4Asserter.CAPACITY - 1, list.size());
   for (int i = 0; i < ArrayList4Asserter.CAPACITY - 1; ++i) {
     Assert.areEqual(new Integer(i + 1), list.get(i));
   }
 }
 private void checkListSizeAndContents(int expectedSize) throws Exception {
   ArrayList4<Integer> list = retrieveAndAssertNullArrayList4();
   Assert.areEqual(expectedSize, list.size());
   for (int i = 0; i < expectedSize; ++i) {
     Assert.areEqual(new Integer(i), list.get(i));
   }
 }
 public void testToString() {
   Assert.areEqual(newPlainSet().toString(), singleCollection().toString());
 }
 public void operate(ArrayList4<Integer> list) {
   Assert.isFalse(list.contains(new Integer(ArrayList4Asserter.CAPACITY)));
 }
 private void checkClear() throws Exception {
   ArrayList4<Integer> list = retrieveAndAssertNullArrayList4();
   Assert.areEqual(0, list.size());
 }
 private void checkAddAll() throws Exception {
   ArrayList4<Integer> list = retrieveAndAssertNullArrayList4();
   for (int i = 0; i < ArrayList4Asserter.CAPACITY * 2; ++i) {
     Assert.areEqual(new Integer(i), list.get(i));
   }
 }