Use Assertions.assertThatObject for ambiguous AssertionsForClassTypes.assertThat calls

MSAL

The 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.MigrateAssertionsForClassTypes
mod run . --recipe=org.openrewrite.java.testing.assertj.MigrateAssertionsForClassTypes

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