title: InjectMocks doesn't work with Kotlin constructor arguments with default values
body: <p>EDIT: I've created a ticket with mockito-kotlin <a href="https://github.com/mockito/mockito-kotlin/issues/439" rel="nofollow noreferrer">here</a></p>
  <p>I have a class defined like so:</p>
  <pre><code>package me.jpalacios.poc
  
  class MyClass(
      private val myDependency: MyDependency = MyDependency()
  ) {
      fun run() {
          myDependency.doSomething()
      }
  }
  </code></pre>
  <pre><code>package me.jpalacios.poc
  
  class MyDependency {
  
      fun doSomething() {
          println(&quot;I did something&quot;)
      }
  }
  </code></pre>
  <pre><code>package me.jpalacios.poc
  
  import org.junit.jupiter.api.Test
  import org.junit.jupiter.api.extension.ExtendWith
  import org.mockito.InjectMocks
  import org.mockito.Mock
  import org.mockito.junit.jupiter.MockitoExtension
  import org.mockito.kotlin.verify
  
  @ExtendWith(MockitoExtension::class)
  class MyClassTest {
  
      @Mock
      private lateinit var myDependency: MyDependency
      @InjectMocks
      private lateinit var myClass: MyClass
  
      @Test
      fun `Test InjectMocks`() {
          myClass.run()
  
          verify(myDependency).doSomething()
      }
  }
  </code></pre>
  <p>Looks like a test defined like so does not work because the mocks are not injected:</p>
  <pre><code>@ExtendWith(MockitoExtension::class)
  class MyClassTest {
      @Mock
      private lateinit var dependency: MyDependency
      @InjectMocks
      private lateinit var underTest: MyClass
  }
  </code></pre>
  <pre><code>plugins {
      kotlin(&quot;jvm&quot;) version &quot;1.5.20&quot;
  }
  
  group = &quot;me.jpalacios&quot;
  version = &quot;1.0-SNAPSHOT&quot;
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      implementation(kotlin(&quot;stdlib&quot;))
  
      testImplementation(&quot;org.junit.jupiter:junit-jupiter:5.7.2&quot;)
      testImplementation(&quot;org.junit.jupiter:junit-jupiter-params:5.7.2&quot;)
      testImplementation(&quot;org.assertj:assertj-core:3.20.2&quot;)
      testImplementation(&quot;org.mockito.kotlin:mockito-kotlin:3.2.0&quot;)
      testImplementation(&quot;org.mockito:mockito-junit-jupiter:3.11.2&quot;)
  }
  
  tasks{
      jar {
          duplicatesStrategy = DuplicatesStrategy.EXCLUDE
  
          configurations[&quot;compileClasspath&quot;].forEach { file: File -&gt;
              from(zipTree(file.absoluteFile))
          }
      }
      compileKotlin {
          kotlinOptions {
              jvmTarget = &quot;${JavaVersion.VERSION_11}&quot;
          }
      }
      test {
          useJUnitPlatform()
      }
  }
  </code></pre>
  <p>Any thoughts as to why?</p>
  <p>The output is:</p>
  <blockquote>
  <p>I did something</p>
  <p>Wanted but not invoked: myDependency.doSomething();
  -&gt; at me.jpalacios.poc.MyDependency.doSomething(MyDependency.kt:6) Actually, there were zero interactions with this mock.</p>
  <p>Wanted but not invoked: myDependency.doSomething();
  -&gt; at me.jpalacios.poc.MyDependency.doSomething(MyDependency.kt:6) Actually, there were zero interactions with this mock.</p>
  <p>at me.jpalacios.poc.MyDependency.doSomething(MyDependency.kt:6)     at
  me.jpalacios.poc.MyClassTest.Test InjectMocks(MyClassTest.kt:22)  at
  java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
  Method)   at
  java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at
  java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  ...</p>
  </blockquote>