Call Hamcrest matcher factories through Matchers

MSAL

Call the static factories of Hamcrest's matcher classes, such as IsEqual.equalTo(..) or IsCollectionWithSize.hasSize(..), through org.hamcrest.Matchers, leaving the instance methods of matchers as they are.

org.openrewrite.java.testing.hamcrest.HamcrestFactoriesToMatchers
mod run . --recipe=org.openrewrite.java.testing.hamcrest.HamcrestFactoriesToMatchers

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