We're updating the issue view to help you get more done.Learn more

Fix AssertJ assertion names

We have a lot of AssertJ assertions to which we have attempted to give readable names, but we actually have the method calls in the wrong order.

The .as(description) call must appear before the actual assertion check, like this:

1 assertThat(foo).as("standard placeholder name").isEqualTo(COMMON_METASYNTACTIC_VARIABLE)

not like this:

1 assertThat(foo).isEqualTo(COMMON_METASYNTACTIC_VARIABLE).as("standard placeholder name")

(IntelliJ actually marks the as call as suspicious, because its result is never used.)

This regex search via ripgrep should show the vast majority of them (with very few false positives):

1 rg '\.as\([^)]*\);'

After those are cleaned up, it might be worth glancing at the results for this too (in case some of the descriptions include parens):

1 rg '\.as\(.*\);'



Damian Jansen


Sean Flanigan

Tested Version/s


Fix versions