Skip to content

Commit 2610176

Browse files
author
Urvy Agrawal
committed
Review comments added
1 parent 115a52a commit 2610176

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core-java/src/test/java/com/baeldung/keyword/test/InstanceOfUnitTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ public void giveWhenTypeIsInterface_thenReturnTrue() {
3535
Circle circle = new Circle();
3636
Assert.assertTrue("circle is instance of Shape", circle instanceof Shape);
3737
}
38+
39+
@Test
40+
public void giveWhenTypeIsOfObjectType_thenReturnTrue() {
41+
Thread thread = new Thread();
42+
Assert.assertTrue("thread is instance of Object", thread instanceof Object);
43+
}
3844

3945
@Test
4046
public void giveWhenInstanceValueIsNull_thenReturnFalse() {

0 commit comments

Comments
 (0)