@Test public void formatErrorMessage() { String actual = Assertion.formatErrorMessage( MESSAGE_PATTERN, ARGUMENT_ONE, ARGUMENT_TWO ); assertThat( actual ).isEqualTo( EXPECTED_MESSAGE ); }
public static String formatErrorMessage( String messagePattern, Object... arguments ) { checkArgument( messagePattern != null, MESSAGE_PATTERN_MUST_NOT_BE_NULL ); checkArgument( arguments != null, ARGUMENTS_MUST_NOT_BE_NULL ); return format( messagePattern, arguments ); }
Assertion { public static String formatErrorMessage( String messagePattern, Object... arguments ) { checkArgument( messagePattern != null, MESSAGE_PATTERN_MUST_NOT_BE_NULL ); checkArgument( arguments != null, ARGUMENTS_MUST_NOT_BE_NULL ); return format( messagePattern, arguments ); } }
Assertion { public static String formatErrorMessage( String messagePattern, Object... arguments ) { checkArgument( messagePattern != null, MESSAGE_PATTERN_MUST_NOT_BE_NULL ); checkArgument( arguments != null, ARGUMENTS_MUST_NOT_BE_NULL ); return format( messagePattern, arguments ); }  }
Assertion { public static String formatErrorMessage( String messagePattern, Object... arguments ) { checkArgument( messagePattern != null, MESSAGE_PATTERN_MUST_NOT_BE_NULL ); checkArgument( arguments != null, ARGUMENTS_MUST_NOT_BE_NULL ); return format( messagePattern, arguments ); }  static void checkArgument( boolean condition, String messagePattern, Object ... arguments ); static void checkState( boolean condition, String messagePattern, Object ... arguments); static String formatErrorMessage( String messagePattern, Object... arguments ); }
Assertion { public static String formatErrorMessage( String messagePattern, Object... arguments ) { checkArgument( messagePattern != null, MESSAGE_PATTERN_MUST_NOT_BE_NULL ); checkArgument( arguments != null, ARGUMENTS_MUST_NOT_BE_NULL ); return format( messagePattern, arguments ); }  static void checkArgument( boolean condition, String messagePattern, Object ... arguments ); static void checkState( boolean condition, String messagePattern, Object ... arguments); static String formatErrorMessage( String messagePattern, Object... arguments );  }