Use Assertions.assertThatObject for ambiguous AssertionsForClassTypes.assertThat calls
MSALThe deprecated AssertionsForClassTypes.assertThat(T) always returns an ObjectAssert, while the unified Assertions.assertThat additionally offers more specific overloads (e.g. for Iterable, Map, Predicate). For arguments matching those overloads, rename assertThat to assertThatObject so that migrating to Assertions keeps returning an ObjectAssert and the code keeps compiling.
org. openrewrite. java. testing. assertj. MigrateAssertionsForClassTypesmod run . --recipe= org. openrewrite. java. testing. assertj. MigrateAssertionsForClassTypesInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.