public void test(TestCase testCase) { System.out.println(testCase.name()); ConstantPool cp = testCase.getConstantPool(); String cpStringRep = cp.toString(); String cpClassSimpleName = CompilerToVMHelper.HotSpotConstantPoolClass().getSimpleName(); if (!cpStringRep.contains(cpClassSimpleName) || !cpStringRep.contains(TEST_CLASS.getName())) { String msg = String.format( "%s : " + " Constant pool is not valid." + " String representation should contain \"%s\" and \"%s\"", testCase.name(), cpClassSimpleName, TEST_CLASS.getName()); throw new AssertionError(msg); } }