Assert { public static void notNull(Object obj, String message) { if (obj == null) { throw new IllegalArgumentException(message); } } protected  Assert(); static void notNull(Object obj, String message); static void notEmptyString(String str,String message); static void notNull(Object obj, RuntimeException exception);  }
@Test public void testNotNull1() { Assertions.assertThrows(IllegalArgumentException.class, () -> notNull(null, "null object")); }
@Test public void testNotNull2() { Assertions.assertThrows(IllegalStateException.class, () -> notNull(null, new IllegalStateException("null object"))); }
@Test public void testNotNullWhenInputNotNull1() { notNull(new Object(), "null object"); }
@Test public void testNotNullWhenInputNotNull2() { notNull(new Object(), new IllegalStateException("null object")); }