Mockito spy doReturn is not working with super class method
<p>I have a class like that is subclass of spring security <code>CoreRememberMeService</code>.</p>

<pre><code>public class CustomRememberService extends CoreRememberMeService`{

    @Override Authentication autoLogin(....) {
         // ...
         user = processAutoLoginCookie(....) //this method is in super class
    }
</code></pre>

<p>When I am trying to run my JUnit, I need to stub this superclass metod 'processAutoLoginCookie' like </p>

<pre><code>Mockito.spy(customeCoreRememberService);    
Mockito.doReturn(user).when(customeCoreRememberService).processAutoLoginCookie(...);
</code></pre>

<p>I simply don't want to call super class method during my test. but it is not working, everytime it is going into super class and not just resturning 'user' as per my expectations. can anyone please point out, why I am not able to stub that?</p>