{"action":"created","issue":{"url":"https://api.github.com/repos/easymock/easymock/issues/180","repository_url":"https://api.github.com/repos/easymock/easymock","labels_url":"https://api.github.com/repos/easymock/easymock/issues/180/labels{/name}","comments_url":"https://api.github.com/repos/easymock/easymock/issues/180/comments","events_url":"https://api.github.com/repos/easymock/easymock/issues/180/events","html_url":"https://github.com/easymock/easymock/issues/180","id":175890293,"number":180,"title":"MissingMethodException: No signature of method when using EasyMock Matcher on Groovy test","user":{"login":"xdrop","id":12696953,"avatar_url":"https://avatars.githubusercontent.com/u/12696953?v=3","gravatar_id":"","url":"https://api.github.com/users/xdrop","html_url":"https://github.com/xdrop","followers_url":"https://api.github.com/users/xdrop/followers","following_url":"https://api.github.com/users/xdrop/following{/other_user}","gists_url":"https://api.github.com/users/xdrop/gists{/gist_id}","starred_url":"https://api.github.com/users/xdrop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xdrop/subscriptions","organizations_url":"https://api.github.com/users/xdrop/orgs","repos_url":"https://api.github.com/users/xdrop/repos","events_url":"https://api.github.com/users/xdrop/events{/privacy}","received_events_url":"https://api.github.com/users/xdrop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-08T23:29:04Z","updated_at":"2016-09-09T01:50:40Z","closed_at":null,"body":"When using EasyMock with groovy tests it fails to `expect()` a matcher if it's on a `boolean` parameter.\r\n\r\n**Versions:**\r\n---------------\r\n**Groovy**: 2.4.6\r\n**EasyMock**: 3.4\r\n\r\n**Failing example**\r\n-----------------\r\n\r\nDemo.java\r\n```java\r\npublic class Demo {\r\n\r\n    public String test(boolean c)  {\r\n        return \"test\";\r\n    }\r\n\r\n}\r\n```\r\n\r\nGroovy test\r\n```java\r\nclass DemoTest extends GroovyTestCase {\r\n    void testTest() {\r\n\r\n        Demo mock = mock(Demo)\r\n\r\n        expect(mock.test(eq(true)))\r\n            .andReturn(\"test\")\r\n\r\n        replay(mock)\r\n\r\n    }\r\n}\r\n```\r\n\r\nResult\r\n```\r\ngroovy.lang.MissingMethodException: No signature of method: Demo$$EnhancerByCGLIB$$ff061b6.test() is applicable for argument types: (null) values: [null]\r\nPossible solutions: test(boolean), test(boolean), wait(), use([Ljava.lang.Object;), getAt(java.lang.String), wait(long)\r\n```\r\n\r\nWhile the java version works fine\r\n```java\r\npublic class DemoTest extends TestCase {\r\n\r\n    @Test\r\n    public void test1() {\r\n        Demo demo = mock(Demo.class);\r\n        expect(demo.test(true))\r\n                .andReturn(\"test\");\r\n\r\n        replay(demo);\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/easymock/easymock/issues/comments/245795546","html_url":"https://github.com/easymock/easymock/issues/180#issuecomment-245795546","issue_url":"https://api.github.com/repos/easymock/easymock/issues/180","id":245795546,"user":{"login":"henri-tremblay","id":1216819,"avatar_url":"https://avatars.githubusercontent.com/u/1216819?v=3","gravatar_id":"","url":"https://api.github.com/users/henri-tremblay","html_url":"https://github.com/henri-tremblay","followers_url":"https://api.github.com/users/henri-tremblay/followers","following_url":"https://api.github.com/users/henri-tremblay/following{/other_user}","gists_url":"https://api.github.com/users/henri-tremblay/gists{/gist_id}","starred_url":"https://api.github.com/users/henri-tremblay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henri-tremblay/subscriptions","organizations_url":"https://api.github.com/users/henri-tremblay/orgs","repos_url":"https://api.github.com/users/henri-tremblay/repos","events_url":"https://api.github.com/users/henri-tremblay/events{/privacy}","received_events_url":"https://api.github.com/users/henri-tremblay/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T01:50:40Z","updated_at":"2016-09-09T01:50:40Z","body":"Interesting. It looks like a Groovy bug. It seems that a boxing occurs on the boolean which causes `eq(Object)` instead of `eq(boolean)` to be called. I will investigate."}}
{"actor":{"display_login":"henri-tremblay"}}