I have class with all the methods static and final. How do I mock a method which is both static and final in the class.
public class UtilityClass{
public static final void utilityMethod(){
}
public static final Integer anotherUtilMethod(){
}
}
How to mock utilMethod() and anotherUtilMethod() using PowerMock?
Then use PowerMockito.when() like you normally would. Look at http://code.google.com/p/powermock/wiki/MockitoUsage13 for examples.