static List populatedArray(int n) {
   List a = ParallelArray.createEmpty(n, Object.class, ParallelArray.defaultExecutor()).asList();
   assertTrue(a.isEmpty());
   for (int i = 0; i < n; ++i) a.add(new Integer(i));
   assertFalse(a.isEmpty());
   assertEquals(n, a.size());
   return a;
 }
 /** new list contains all elements of initializing array */
 public void testConstructor2() {
   Integer[] ints = new Integer[SIZE];
   for (int i = 0; i < SIZE - 1; ++i) ints[i] = new Integer(i);
   List a = ParallelArray.createUsingHandoff(ints, ParallelArray.defaultExecutor()).asList();
   for (int i = 0; i < SIZE; ++i) assertEquals(ints[i], a.get(i));
 }
 /** a new list is empty */
 public void testConstructor() {
   List a = ParallelArray.createEmpty(1, Object.class, ParallelArray.defaultExecutor()).asList();
   assertTrue(a.isEmpty());
 }
 static List emptyArray() {
   List a = ParallelArray.createEmpty(1, Object.class, ParallelArray.defaultExecutor()).asList();
   return a;
 }