### Question:
PreCondition { public static void notNull(Object reference, String errorMessage) { if (reference == null) { throw new NullPointerException(errorMessage); } } private  PreCondition(); static void isTrue(boolean expression, String errorMessageTemplate, Object... errorMessageArguments); static void isTrue(boolean expression, String errorMessage); static void notEmpty(String string, String errorMessage); static void notNull(Object reference, String errorMessage);  }### Answer:
@Test public void notNull_ObjectIsNotNull_ShouldNotThrowException() { PreCondition.notNull(new Object(), STATIC_ERROR_MESSAGE); }
@Test public void notNull_ObjectIsNull_ShouldThrowException() { assertThatThrownBy(() -> PreCondition.notNull(null, STATIC_ERROR_MESSAGE)) .isExactlyInstanceOf(NullPointerException.class) .hasMessage(STATIC_ERROR_MESSAGE); }