assertj
Installation
SKILL.md
assertj
Overview
AssertJ is "a Java library that provides a rich set of assertions and truly helpful error messages, improves test code readability, and is designed to be super easy to use within your favorite IDE" ([assertj.github.io/doc][aj]). It ships modules for JDK core types, Guava, Joda-Time, and databases; this skill covers assertj-core (JDK types).
Works alongside junit5-tests, testng-tests, or spock-tests. AssertJ handles the assertion layer; those skills handle the test runner.
This skill is a reference - defines the matcher catalog and patterns; does not run tests. Advanced per-feature variants live in references/matcher-catalog.md; provenance links are consolidated under References.
When to use
- JVM project (Java 8+ or Kotlin 1.9+) using any test framework.
- Need richer assertion failure messages than built-in
assertEquals/assertTrue. - Deep-equality checking between object graphs without overriding
equals. - Verifying collections, exception details, or running multiple assertions without failing on the first one.