### Question:
ObjectUtil { public static <T> T requireNonNull(T obj, String message) { if (obj == null) throw new NullPointerException(message); return obj; }  static boolean equals(Object object1, Object object2); static T requireNonNull(T obj, String message); static void requireNotEmpty(String str, String message);  }### Answer:
@Test public void testRequireNonNull() { String message = "Must not be null in test"; try { ObjectUtil.requireNonNull(null, message); fail("should not get here."); } catch (NullPointerException e) { assertEquals(message, e.getMessage()); } assertNotNull(ObjectUtil.requireNonNull("some string", message)); }