Simplify assertThat(collection.stream().map(...)) to assertThat(collection).extracting(...)

MSAL

Simplifies AssertJ assertions that use stream().map() to extract values from a collection by using the dedicated extracting() method instead. This makes the assertion more readable and leverages AssertJ's built-in extraction capabilities.

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

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