@Test
	public void testAddWhileIterate() {
		Bag<Integer> myList = new Bag<Integer>(2);		
		
		myList.add(1);
		myList.add(2);
		
		myList.reset();
		assertTrue(myList.hasNext());
		myList.next();
		int x = myList.next();
		myList.remove(x);
		myList.add(3);
		assertTrue(myList.hasNext());
		assertTrue(myList.next() == 3);
		assertFalse(myList.hasNext());
		
		myList.reset();
		ArrayList<Integer> testList = new ArrayList<Integer>();
		testList.add(x==1 ? 2 : 1);
		testList.add(3);
		verifyContents(testList, myList);
	}