Leon 5 years ago
parent
commit
aa72d9a451

+ 2
- 2
src/test/java/rocks/zipcode/quiz5/objectorientation/employee/EmployeePolymorphismTest.java View File

24
     }
24
     }
25
 
25
 
26
 
26
 
27
-    @Test
27
+    @Test(expected = ClassCastException.class)
28
     public void test3() {
28
     public void test3() {
29
-        Assert.assertFalse((Account) (Object) employee instanceof Account);
29
+        Account account = (Account) (Object) employee;
30
     }
30
     }
31
 }
31
 }