From 92d7d55eb5ad86e9a9826e061911ee32d7518cc8 Mon Sep 17 00:00:00 2001 From: lingenj Date: Tue, 10 Dec 2024 15:17:57 +0100 Subject: [PATCH] Improvement --- .../java/testing/easymock/EasyMockToMockitoTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/openrewrite/java/testing/easymock/EasyMockToMockitoTest.java b/src/test/java/org/openrewrite/java/testing/easymock/EasyMockToMockitoTest.java index b2eceebd4..3b24b3ac8 100644 --- a/src/test/java/org/openrewrite/java/testing/easymock/EasyMockToMockitoTest.java +++ b/src/test/java/org/openrewrite/java/testing/easymock/EasyMockToMockitoTest.java @@ -179,9 +179,10 @@ class User { private String email; } - // The `Object ignore` makes it possible to ignore the removal-matcher-optimization code + // The second `Object ignore` argument disables the removal-matcher-optimization code like: + // expect(service.addUser(eq(new User()))) to expect(service.addUser(new User())); class UserService { - boolean addUser(User user, Object ignore) { return true; } + boolean addUser(User user) { return true; } List findByEmail(String email, Object ignore) { return new ArrayList<>(); } List findByAge(double age, Object ignore) { return new ArrayList<>(); } }"""