Assertion arguments should be passed in the correct order

MSAL

Assertions such as org.junit.Assert.assertEquals expect the first argument to be the expected value and the second argument to be the actual value; for org.testng.Assert, it’s the other way around. This recipe detects J.Literal, J.NewArray, and java.util.Iterable arguments swapping them if necessary so that the error messages won't be confusing.

org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder
mod run . --recipe=org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.