JUnit is the reference unit testing framework in Java; JUnit 6 builds on the Jupiter model: tests annotated with @Test, assertions from org.junit.jupiter.api.Assertions, and lifecycle and parameterization annotations. The runner executes the tests via Maven or Gradle.
Example
@Test
void additionne() {
assertEquals(4, 2 + 2);
}