Simplify AssertJ assertions on an array's length

MSAL

Replace assertThat(array.length) size assertions with the dedicated array assertions, such as assertThat(array).hasSize(n), assertThat(array).isEmpty() and assertThat(array).hasSameSizeAs(other). Works for both object and primitive arrays.

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

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