title: How to set Mockito rules at one place (super class) for all sub class
body: <p>I have recently started working with <code>@Mockito</code> annotation at Junit Tests.</p>
  
  <p>the reason i started using <code>@Mockito</code> is because using <code>@Autowired</code> for all the service class took very long.</p>
  
  <p>i have more than 50 test that using the same class for exmple: <code>userService</code></p>
  
  <p>i would like to have this at my super class</p>
  
  <pre><code>@Mock
      private UserService userService;
  </code></pre>
  
  <p>and to set Mocking for all the sub class , all sub class have diffrent method and multiple <code>@Test</code></p>
  
  <p>Normally what i do is adding this line in the <code>@Test</code> method :</p>
  
  <pre><code> Mockito.when(userService.isValid()).thenReturn(true));
  </code></pre>
  
  <p>How could i set this Mocking at one place (in super class) and all sub class could know using this Mock ?</p>