{"action":"created","issue":{"url":"https://api.github.com/repos/junit-team/junit5-samples/issues/6","repository_url":"https://api.github.com/repos/junit-team/junit5-samples","labels_url":"https://api.github.com/repos/junit-team/junit5-samples/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/junit-team/junit5-samples/issues/6/comments","events_url":"https://api.github.com/repos/junit-team/junit5-samples/issues/6/events","html_url":"https://github.com/junit-team/junit5-samples/issues/6","id":161254173,"number":6,"title":"Store is misused in MockitoExtension","user":{"login":"smoyer64","id":328333,"avatar_url":"https://avatars.githubusercontent.com/u/328333?v=3","gravatar_id":"","url":"https://api.github.com/users/smoyer64","html_url":"https://github.com/smoyer64","followers_url":"https://api.github.com/users/smoyer64/followers","following_url":"https://api.github.com/users/smoyer64/following{/other_user}","gists_url":"https://api.github.com/users/smoyer64/gists{/gist_id}","starred_url":"https://api.github.com/users/smoyer64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smoyer64/subscriptions","organizations_url":"https://api.github.com/users/smoyer64/orgs","repos_url":"https://api.github.com/users/smoyer64/repos","events_url":"https://api.github.com/users/smoyer64/events{/privacy}","received_events_url":"https://api.github.com/users/smoyer64/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-20T17:50:15Z","updated_at":"2016-06-21T13:35:31Z","closed_at":"2016-06-21T13:35:31Z","body":"I realize that MockitoExtension should not be considered for production use but the way the ExtensionContext.Store is used isn't a good example of why a Store should be used.  With the existing code, it's possible to return two references to the same object if the same Java class is \"injected\" into a test method twice.  For instance:\r\n\r\n```\r\n@ExtendWith(MockitoExtension.class)\r\npublic class MockitoExtensionMisuse {\r\n  \r\n  @Test\r\n  public void testSomethingWithTwoProperties(@InjectMock Properties properties1, @InjectMock Properties properties2) {\r\n    ...\r\n  }\r\n\r\n}\r\n```\r\n\r\nIn the testSomethingWithTwoProperties() method, both properties1 and properties2 will be references to the same instance."},"comment":{"url":"https://api.github.com/repos/junit-team/junit5-samples/issues/comments/227441235","html_url":"https://github.com/junit-team/junit5-samples/issues/6#issuecomment-227441235","issue_url":"https://api.github.com/repos/junit-team/junit5-samples/issues/6","id":227441235,"user":{"login":"sbrannen","id":104798,"avatar_url":"https://avatars.githubusercontent.com/u/104798?v=3","gravatar_id":"","url":"https://api.github.com/users/sbrannen","html_url":"https://github.com/sbrannen","followers_url":"https://api.github.com/users/sbrannen/followers","following_url":"https://api.github.com/users/sbrannen/following{/other_user}","gists_url":"https://api.github.com/users/sbrannen/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrannen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrannen/subscriptions","organizations_url":"https://api.github.com/users/sbrannen/orgs","repos_url":"https://api.github.com/users/sbrannen/repos","events_url":"https://api.github.com/users/sbrannen/events{/privacy}","received_events_url":"https://api.github.com/users/sbrannen/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T13:35:31Z","updated_at":"2016-06-21T13:35:31Z","body":"Resolved in 039d920c7ff9767b4dbc522febb685ede0b5d053."}}
{"actor":{"display_login":"sbrannen"}}