@Test public void testObjectNotNull() { Object obj = new Object(); AssertJUnit.assertNotNull(obj); }
@Test public void testObjectNull() { Object obj = null; AssertJUnit.assertNull(obj); }This test will pass because the obj variable is null. Overall, the org.testng.AssertJUnit package library provides a set of useful assertion methods for writing TestNG tests in Java.