void () { doTest("java.lang.ClassCastException: class X cannot be cast to class java.lang.Number", "Find why 'obj' could be X (not-null)", "class X {static void test(Object obj) {System.out.println(((Number) obj).intValue());}}"); }