Simplify literal-first AssertJ size assertions to hasSize

MSAL

Replace assertThat(<int literal>).isEqualTo(collection.size()) style assertions with the dedicated assertThat(collection).hasSize(<int literal>). Only the structural size form is rewritten, where the comparison is on a primitive int and reversing the assertion is behavior-preserving (unlike arbitrary isEqualTo object comparisons, which rely on equals).

org.openrewrite.java.testing.assertj.SimplifyHasSizeFromIsEqualToAssertion
mod run . --recipe=org.openrewrite.java.testing.assertj.SimplifyHasSizeFromIsEqualToAssertion

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