junit test specific class code example Example: junit check class type assertTrue(objectUnderTest instanceof TargetObject);