79794835

Date: 2025-10-20 11:22:23
Score: 0.5
Natty:
Report link

For those coming here late: AssertJ 3.17.0 introduced singleElement(). There are further nice list navigation methods, see Navigating to a given element

assertThat(asia)
    .extracting(Region::getCountries)
    .singleElement()
    .isInstanceOfSatisfying(String.class, countryRequirement);

See also this answer.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: vboerchers