Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } }  static void isTrue(boolean condition, String message); static void notNull(Object object, String message); static void hasLength(String input, int length, String message); static void hasSize(Collection<?> input, int length, String message);  }
@Test public void testNotNull() { Assert.notNull("", "Not null"); try { Assert.notNull(null, "null"); fail("Expected exception"); } catch (IllegalArgumentException e) { assertThat(e.getMessage()).isEqualTo("null"); } }