How does one use EasyMock in order to test static functions that cannot be overridden? I have one large test suite class, and I partially mock an object 'A' inside of my test suite. As i mock my object 'A', is there any way to expect these static method calls which take in arguments?
For the sake of the code, classes A and B have to stay in their current position and cannot be rearranged due to outside dependencies. Class 'A' makes a call onto bar() from class 'B'. I need to be able to mock method foo() or method bar(), however they are static and take in arguments.
Class in question:
class A extends B {
public static void foo(args...) {
...
bar(args...);
}
}
class B {
public static void bar(args...) {
....
}
}