### Question:
ValidationUtils { public static <T> T assertNotNull(T object, String fieldName) { if (object == null) { throw new IllegalArgumentException(String.format("%s cannot be null", fieldName)); } return object; }  static T assertNotNull(T object, String fieldName); static void assertParameterNotNull(Object parameterValue, String errorMessage); static void assertAllAreNull(String messageIfNull, Object... objects); static int assertIsPositive(int num, String fieldName); static T assertNotEmpty(T collection, String fieldName); static T[] assertNotEmpty(T[] array, String fieldName); static String assertStringNotEmpty(String string, String fieldName);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void assertNotNull_NullObject_ThrowsException() { ValidationUtils.assertNotNull(null, "someField"); }
@Test public void assertNotNull_NonNullObject_ReturnsSameObject() { final String nonNullString = "foo"; assertEquals(nonNullString, ValidationUtils.assertNotNull(nonNullString, "nonNullString")); }