Question: Is there anyway tom mock the super method call in a class using Powermock?

For example:

```
public void processRetrievedData() {
  super.processRetrievedData();
}

```

is there anyway to mock “super.processRetrievedData()” ?

Thanks,

Rajan

Answer: 
Although this is bad practice, sometimes you need to mock out inheritance when your are working in an environment where there is no choice. For example, I needed to mock out super class methods in a Dialog Fragment in Android to isolate my unit tests. In your case, within your test use...

```
@PrepareForTest(ChildClass.class)
public class ChildClassTest {
    @Test
    public void testMethod() {
        PowerMockito.suppress(PowerMockito.method(SuperClass.class, "processRetrievedData"))
        // Run method and test
    }
}

```

There are other overloaded methods listed in the [API](http://www.javadoc.io/doc/org.powermock/powermock-api-support/1.6.4) under the MemberMatcher class that are useful in other cases such as, method has parameters, there are additional inherited methods, etc. Hope that helps.
This is a terrible idea and a dirty hack. 

If this is a part of your subject under test then you should never, ever do such things since you're testing the behaviour of that whole class and not only part of it.

If you really need to do sth similar you can extend the class and override the processRetrievedData method so that it doesn't call super - that way you stub that method.