Index: src/test/api/common/tests/api/java/util/AbstractListTest.java =================================================================== --- src/test/api/common/tests/api/java/util/AbstractListTest.java (revision 560840) +++ src/test/api/common/tests/api/java/util/AbstractListTest.java (working copy) @@ -297,4 +297,45 @@ } protected void doneSuite() {} + + class MockRemoveFailureArrayList extends AbstractList { + + @Override + public E get(int location) { + // TODO Auto-generated method stub + return null; + } + + @Override + public int size() { + // TODO Auto-generated method stub + return 0; + } + + public E remove(int idx) { + modCount+=2; + return null; + } + + public int getModCount(){ + return modCount; + } + } + + //test remove for failure by inconsistency of modCount and expectedModCount + public void test_remove(){ + MockRemoveFailureArrayList mrfal = new MockRemoveFailureArrayList(); + Iterator imrfal= mrfal.iterator(); + imrfal.next(); + imrfal.remove(); + try{ + imrfal.remove(); + } + catch(ConcurrentModificationException e){ + fail("Excepted to catch IllegalStateException not ConcurrentModificationException"); + } + catch(IllegalStateException e){ + //Excepted to catch IllegalStateException here + } + } }