I am writing jmockit testcase for a class which calls a static method from different class.
I want to throw exception when the static method is called
class ClassToBeTested {
methodToBeMocked(){
if(ClasswithStaticMethod.staticMethod()){
}
}
}
On ClassToBeTested.methodToBeMocked() I want exception to be thrown from staticMethod.
How can this be achieved using jmockit?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…