假设我有一个这样的实用程序类:
public final class NumberUtility{
public static int getNumberPlusOne(int num){
return doSomethingFancyInternally(num);
}
private static int doSomethingFancyInternally(int num){
//Fancy code here...
return num;
}
}
假设我不改变类的结构,如何doSomethingFancyInternally()
使用 Powermock 模拟方法?