{"action":"created","issue":{"url":"https://api.github.com/repos/jayway/powermock/issues/158","labels_url":"https://api.github.com/repos/jayway/powermock/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/jayway/powermock/issues/158/comments","events_url":"https://api.github.com/repos/jayway/powermock/issues/158/events","html_url":"https://github.com/jayway/powermock/issues/158","id":96816194,"number":158,"title":"rename PowerMockito#mock to PowerMockito#powermock","user":{"login":"johanhaleby","id":187029,"avatar_url":"https://avatars.githubusercontent.com/u/187029?v=3","gravatar_id":"","url":"https://api.github.com/users/johanhaleby","html_url":"https://github.com/johanhaleby","followers_url":"https://api.github.com/users/johanhaleby/followers","following_url":"https://api.github.com/users/johanhaleby/following{/other_user}","gists_url":"https://api.github.com/users/johanhaleby/gists{/gist_id}","starred_url":"https://api.github.com/users/johanhaleby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanhaleby/subscriptions","organizations_url":"https://api.github.com/users/johanhaleby/orgs","repos_url":"https://api.github.com/users/johanhaleby/repos","events_url":"https://api.github.com/users/johanhaleby/events{/privacy}","received_events_url":"https://api.github.com/users/johanhaleby/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jayway/powermock/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/jayway/powermock/labels/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/jayway/powermock/labels/Milestone-Release1.3","name":"Milestone-Release1.3","color":"FFFFFF"},{"url":"https://api.github.com/repos/jayway/powermock/labels/Priority-Medium","name":"Priority-Medium","color":"FFFFFF"},{"url":"https://api.github.com/repos/jayway/powermock/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-23T13:36:29Z","updated_at":"2015-07-23T13:36:36Z","closed_at":null,"body":"_From [joe.kear...@gtempaccount.com](https://code.google.com/u/108481343980805058228/) on August 12, 2009 15:42:26_\n\nI'd like to suggest renaming the PowerMockito#mock methods to\r\nPowerMockito#powermock. The reason for this is to allow the PowerMockito\r\nand vanilla Mockito mock methods both to be used through static imports.\r\nCurrently you can only use one of them in this way per compilation unit.\r\n\r\nIt seems reasonable to restrict usage of PowerMock mocking to those classes\r\nthat actually need it, and avoid the @PrepareForTest arguments for those\r\nclasses that can be mocked using Mockito.\r\n\r\nBackwards compatibility needn't be an issue; leave the current methods and\r\ndeprecate them, delegating to powermock().\r\n\r\nAside:\r\nOn the other hand, perhaps a more complete solution would be to do away\r\nwith the PowerMockito methods all together, instead mocking the Mockito\r\nclass to work for all classes that PowerMockito is able to mock, allowing\r\nthe user to say Mockito#mock(String.class) or whatever and leaving the\r\nPowerMock infrastructure to decide what to do.\r\n\r\n(This is an enhancement request, not a defect.)\n\n_Original issue: http://code.google.com/p/powermock/issues/detail?id=138_"},"comment":{"url":"https://api.github.com/repos/jayway/powermock/issues/comments/124102214","html_url":"https://github.com/jayway/powermock/issues/158#issuecomment-124102214","issue_url":"https://api.github.com/repos/jayway/powermock/issues/158","id":124102214,"user":{"login":"johanhaleby","id":187029,"avatar_url":"https://avatars.githubusercontent.com/u/187029?v=3","gravatar_id":"","url":"https://api.github.com/users/johanhaleby","html_url":"https://github.com/johanhaleby","followers_url":"https://api.github.com/users/johanhaleby/followers","following_url":"https://api.github.com/users/johanhaleby/following{/other_user}","gists_url":"https://api.github.com/users/johanhaleby/gists{/gist_id}","starred_url":"https://api.github.com/users/johanhaleby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanhaleby/subscriptions","organizations_url":"https://api.github.com/users/johanhaleby/orgs","repos_url":"https://api.github.com/users/johanhaleby/repos","events_url":"https://api.github.com/users/johanhaleby/events{/privacy}","received_events_url":"https://api.github.com/users/johanhaleby/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T13:36:36Z","updated_at":"2015-07-23T13:36:36Z","body":"_From [joe.kear...@gtempaccount.com](https://code.google.com/u/108481343980805058228/) on August 12, 2009 08:02:32_\n\nAh, so is the intention that all mocking when using PowerMock and Mockito should go\r\nthrough PowerMockito, even when the class is non-final etc. and can be handled\r\nnormally by Mockito, but only requiring the @PrepareForTest annotation for those\r\nclasses that need special treatment?\r\n\r\nThat makes sense. Thanks for clarifying that."}}