Simplify assertThat(collection.stream().map(...)) to assertThat(collection).extracting(...)
MSALSimplifies 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. SimplifyStreamMapToExtractingmod run . --recipe= org. openrewrite. java. testing. assertj. SimplifyStreamMapToExtractingInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.