Hi,
In below example, I'm trying to mock e.set() method to throw Exception. However, I tried mockStatic + doThrow(Exception).when(e).set() and prepared for class E and R, but still not able to mock set method since no exception was thrown. Just wonder is it a known issue in powermockito, or I missed something here?
This might be some similar question:
public enum R implements I{
R1 {
xxx
}
R2 {
@Override
public I method1(){
E e = new E();
e.set();
}
}
}
------
//some other class named E
public void set() throws Exception{
xxx
}
Thanks