void () { ArrayList collection = new ArrayList(); collection.add(new Integer(1)); collection.add("x"); collection.add(new Integer(2)); collection.add("2"); collection.add("x"); Object[] expected = new Object[]{new Integer(1), new Integer(2), "2"}; checkRemove(expected, collection); collection.add(0, "x"); checkRemove(expected, collection); }