title: Mockito with Springboot: Use a different instance instead of mocking a method
body: <p>In Mockito we can mock a method, but I'm wondering is it possible to use a different instance altogether?</p>
  
  <p>More especially in my code, I <code>Autowired</code> a <code>Clock</code> as a private field and while testing I want to just use <code>Clock.systemDefaultZone()</code>. I don't want to mock a specific method of it. </p>
  
  <p>The following is my unit test class:</p>
  
  <pre><code>@RunWith(MockitoJUnitRunner.class)
  @EnableAutoConfiguration
  @SpringBootTest(classes = {Application.class})
  @ActiveProfiles(profiles = {"test"})
  public class FooTest extends TestCase {
  
      @Mock
      private Clock clock;
  
  }
  </code></pre>