PowerMock相关
作者:互联网
Mock外部服务调用
PowerMockito.when([外部类].[调用的方法](Mockito.anyInt(),Mockito.anyString()).thenReturn([想返回的对象]);
Mock静态方法
PowerMockito.mockStatic(类.class);
PowerMockito.when([类].[方法](Mockito.any())).thenReturn([返回对象]);
标签:PowerMockito,调用,thenReturn,Mockito,when,相关,PowerMock,Mock 来源: https://www.cnblogs.com/xyl322/p/14819432.html