long (List<Object> list) { long start = System.currentTimeMillis(); for (int n = 0; n < 10000000; n++) { list.add(this); list.remove(this); list.add(this); list.remove(0); } long finish = System.currentTimeMillis(); assertTrue(list.isEmpty()); return finish - start; }