title: @SpyBean not working with Pact and JUnit 5
body: <p>I'm trying to use the <code>@SpyBean</code> to mock a method of a <code>@Component</code> and doesn't work. <code>@MockBean</code> works (followed the <a href="https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-provider-spring" rel="nofollow noreferrer">example</a>). I've tried, read and researched many ways but couldn't make it work.</p>
  
  <p>Here's the example:</p>
  
  <pre><code>@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment. DEFINED_PORT)
  @ExtendWith(SpringExtension::class)
  @Provider("MyMicroService")
  @PactFolder("../../../pacts")
  internal class ClientContracts {
  
      @SpyBean
      private lateinit var myService: MyService
  
      @TestTemplate
      @ExtendWith(PactVerificationInvocationContextProvider::class)
      fun pactVerificationTestTemplate(context: PactVerificationContext) {
          context.verifyInteraction()
      }
  
      @State("default", "NO_DATA")
      fun toDefaultState() {
          reset(processService)
      }
  }
  </code></pre>
  
  <p>(I super simplified the test function so it's easier to read, I'd be actually doing <code>doReturn(...).when(...).blah()</code>)</p>
  
  <p>I'm always getting the "not a mock" error, because the object is always the bean wrapped by Spring CGLIB:</p>
  
  <pre><code>org.mockito.exceptions.misusing.NotAMockException: Argument should be a mock, but is: class com.blah.MyServiceImpl$$EnhancerBySpringCGLIB$$9712a2a5
      at com.nhaarman.mockitokotlin2.MockitoKt.reset(Mockito.kt:36)
  ...
  </code></pre>
  
  <p>I've tried:</p>
  
  <ul>
  <li>with <code>@SpringJUnitConfig</code></li>
  <li>with a separate <code>@TestConfiguration</code>, but got resolved to same above bean</li>
  <li>Using <code>Mockito.initAnnotations(this)</code> in a <code>@BeforeEach</code></li>
  <li>and more, I've tried with so many combinations that I can't remember...</li>
  </ul>
  
  <p>Is there something that I'm missing? Or an option that I don't know?</p>