Code example for ExemptionMechanismException

0
        protected void finalize() { 
            flag = true;
            super.finalize(); 
        } 
    } 
     
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "finalize", 
        args = {} 
    ) 
    @SideEffect("Causes OutOfMemoryError to test finalization") 
    public void test_finalize () { 
        Mock_ExemptionMechanism mem = new Mock_ExemptionMechanism(null, null, "Name");
        assertNotNull(mem);
        mem = null;
        assertFalse(flag);
        Vector v = new Vector();
        int capacity;
        try {