I am using EasyMock in my JUnit tests. I want to mock a static method that is present in the parent class. For example :
Class A {
public void testOne() {
Map map = StaticClass.method();
// using map code here ...
}
}
Class B extends A {
public void testTwo(){
testOne();`
}
}
Now, I am writing a JUnit test for class B
and I want to mock StaticClass.method()
in class A
.
How to implement this ?