### Question:
PreCondition { public static void notEmpty(String string, String errorMessage) { if (string.isEmpty()) { throw new IllegalArgumentException(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 notEmpty_StringIsNotEmpty_ShouldNotThrowException() { PreCondition.notEmpty(" ", STATIC_ERROR_MESSAGE); }
@Test public void notEmpty_StringIsEmpty_ShouldThrowException() { assertThatThrownBy(() -> PreCondition.notEmpty("", STATIC_ERROR_MESSAGE)) .isExactlyInstanceOf(IllegalArgumentException.class) .hasMessage(STATIC_ERROR_MESSAGE); }