Add one test for VarHandle.compareAndSet().

Check for ClassCastException when the type of expected
object is wrong.

Test: testrunner.py --host -t 712-varhandle-invocations
Bug: 65872996
Change-Id: Ib9f1a15aa62aba82120974e5b2077d4a8939eb73
diff --git a/test/712-varhandle-invocations/src/VarHandleTypeConversionTests.java b/test/712-varhandle-invocations/src/VarHandleTypeConversionTests.java
index b394a31..73e3044 100644
--- a/test/712-varhandle-invocations/src/VarHandleTypeConversionTests.java
+++ b/test/712-varhandle-invocations/src/VarHandleTypeConversionTests.java
@@ -1217,6 +1217,11 @@
                 failUnreachable();
             } catch (UnsupportedOperationException e) {
             }
+            try {
+                boolean result = vh.compareAndSet(this, new Object(), Widget.ONE);
+                failUnreachable();
+            } catch (ClassCastException e) {
+            }
         }
     }