Assertion arguments should be passed in the correct order
MSALAssertions 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. AssertionsArgumentOrdermod run . --recipe= org. openrewrite. java. testing. cleanup. AssertionsArgumentOrderInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.