79795526

Date: 2025-10-21 07:01:59
Score: 1
Natty:
Report link

You could also set your conditions without AssertJ and then just verify the boolean value with AssertJ.

Like this:

boolean result = list.stream()
                   .anyMatch(element -> element.matches(regex) || element.equals(specificString));

assertThat(result).isTrue()
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Diego Pansica