diff --git a/spring-test/src/main/java/org/springframework/test/util/AssertionErrors.java b/spring-test/src/main/java/org/springframework/test/util/AssertionErrors.java index 1c47743aa2924f21702c5bcd03b3f67ab05968d3..aea7f8e4cfdc6093d60a8309027051d399f0cd05 100644 --- a/spring-test/src/main/java/org/springframework/test/util/AssertionErrors.java +++ b/spring-test/src/main/java/org/springframework/test/util/AssertionErrors.java @@ -39,16 +39,19 @@ public abstract class AssertionErrors { /** * Fail a test with the given message passing along expected and actual - * values to be added to the message. + * values to be appended to the message. *

For example given: *

-	 * assertEquals("Response header [" + name + "]", actual, expected);
+	 * String name = "Accept";
+	 * String expected = "application/json";
+	 * String actual = "text/plain";
+	 * fail("Response header [" + name + "]", expected, actual);
 	 * 
*

The resulting message is: *

 	 * Response header [Accept] expected:<application/json> but was:<text/plain>
 	 * 
- * @param message a message describes the value that failed the match + * @param message a message that describes the use case that failed * @param expected the expected value * @param actual the actual value */ @@ -85,9 +88,10 @@ public abstract class AssertionErrors { *
 	 * assertEquals("Response header [" + name + "]", expected, actual);
 	 * 
- * @param message a message that describes the reason for the failure + * @param message a message that describes the value being checked * @param expected the expected value * @param actual the actual value + * @see #fail(String, Object, Object) */ public static void assertEquals(String message, @Nullable Object expected, @Nullable Object actual) { if (!ObjectUtils.nullSafeEquals(expected, actual)) { @@ -101,7 +105,7 @@ public abstract class AssertionErrors { *
 	 * assertNotEquals("Response header [" + name + "]", expected, actual);
 	 * 
- * @param message a message that describes the reason for the failure + * @param message a message that describes the value being checked * @param expected the expected value * @param actual the actual value */