Skip to end of metadata
Go to start of metadata

If JUnit 4 (or greater) is in the classpath, failures of

will throw ComparisonFailure instead of the default AssertionError.

This feature can be useful when using tools that have special support for this exception. For example, Eclipse provides a nice GUI that shows the differences between the expected and actual String values: