例外の取得:
although stubbed methods may return mocks, you cannot inline mock creation (mock()) call inside a thenReturn method (see issue 53)
https://code.google.com/p/powermock/wiki/MockitoUsageをフォローしています
PowerMockito.mockStatic(MyUtil.class);
Mockito.when(MyUtil.compareVersion("1","2")).thenReturn(200);
また、このクラスを部分的にモックしたいのですが、このクラスには他のメソッドがありますが、モックしたくないので、通常どおり実行する必要があります。
詳細な例外:
org.mockito.exceptions.misusing.UnfinishedStubbingException:
Unfinished stubbing detected here:
-> at org.powermock.api.mockito.internal.PowerMockitoCore.doAnswer(PowerMockitoCore.java:31)