{"action":"opened","issue":{"url":"https://api.github.com/repos/henri-tremblay/mytest/issues/95","labels_url":"https://api.github.com/repos/henri-tremblay/mytest/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/henri-tremblay/mytest/issues/95/comments","events_url":"https://api.github.com/repos/henri-tremblay/mytest/issues/95/events","html_url":"https://github.com/henri-tremblay/mytest/issues/95","id":82989229,"number":95,"title":"expected method not called in overloaded generic methods","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},"labels":[{"url":"https://api.github.com/repos/henri-tremblay/mytest/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/henri-tremblay/mytest/labels/core","name":"core","color":"f7c6c7"},{"url":"https://api.github.com/repos/henri-tremblay/mytest/labels/major","name":"major","color":"f7c6c7"}],"state":"open","locked":false,"assignee":{"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},"milestone":null,"comments":1,"created_at":"2015-05-31T03:51:20Z","updated_at":"2015-05-31T03:51:20Z","closed_at":null,"body":"*Migrated from:* CodeHaus issue EASYMOCK-34\n*Original reporter:* Henri Tremblay\n\n---------------------------------------------------------\nSuppose we have:\r\n\r\npublic interface A<T, U>\r\n{\r\n   public U foo(T t);\r\n}\r\n\r\npublic interface B extends A<TImpl, UImpl>\r\n{\r\n   public UImpl foo(TImpl t);\r\n}\r\n\r\nGranted, the fact that B even defines this method is totally useless, but it is syntactically valid, and is seen from time to time after partial refactorings when someone misses a method.\r\n\r\nNow in a TestCase we have:\r\n\r\nB b = createMock(B.class);\r\nexpect(foo(isA(TImpl.class)));\r\nreplay(b);\r\n\r\nb.foo(new TImpl());\r\n\r\nThis causes an assertion failure on an unexpected method call to foo.\r\n\r\nHowever,\r\n\r\nA<TImpl, UImpl> b = createMock(A.class);\r\nexpect(foo(isA(TImpl.class)));\r\nreplay(b);\r\n\r\nb.foo(new TImpl());\r\n\r\nsucceeds!\n"}}