Code example for ConcurrentModificationException

0
cm.stopNow();
        // The exception should have been thrown--if the code flow makes it here 
        // the test has failed 
        fail("Failed to throw expected ConcurrentModificationException");
    } 
 
    /** 
     * @tests java.util.ConcurrentModificationException#ConcurrentModificationException(java.lang.String) 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "ConcurrentModificationException", 
        args = {java.lang.String.class}
    ) 
    public void test_ConstructorLjava_lang_String() { 
        // Test for method 
        // java.util.ConcurrentModificationException(java.lang.String) 
        String errorMessage = "This is an error message";
        try {