### Question:
PreCondition { public static void isTrue(boolean expression, String errorMessageTemplate, Object... errorMessageArguments) { isTrue(expression, String.format(errorMessageTemplate, errorMessageArguments)); } 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 isTrueWithDynamicErrorMessage_ExpressionIsTrue_ShouldNotThrowException() { PreCondition.isTrue(true, "Dynamic error message with parameter: %d", 1L); }
@Test public void isTrueWithDynamicErrorMessage_ExpressionIsFalse_ShouldThrowException() { assertThatThrownBy(() -> PreCondition.isTrue(false, "Dynamic error message with parameter: %d", 1L)) .isExactlyInstanceOf(IllegalArgumentException.class) .hasMessage("Dynamic error message with parameter: 1"); }
@Test public void isTrueWithStaticErrorMessage_ExpressionIsTrue_ShouldNotThrowException() { PreCondition.isTrue(true, STATIC_ERROR_MESSAGE); }
@Test public void isTrueWithStaticErrorMessage_ExpressionIsFalse_ShouldThrowException() { assertThatThrownBy(() -> PreCondition.isTrue(false, STATIC_ERROR_MESSAGE)) .isExactlyInstanceOf(IllegalArgumentException.class) .hasMessage(STATIC_ERROR_MESSAGE); }