title: MockK cannot match constructor signature
body: <p>I am implementing a method that removes aliases from an index in Elasticsearch. In order to verify that the method performs a request to Elasticsearch with desired parameters I am writing a unit test using mockK library. However, the signature of <code>org.apache.http.nio.entity.NStringEntity</code> class constructor signature does not match in the unit test even though there is only one such constructor (<code>public NStringEntity(final String s, final ContentType contentType)</code>). Any ideas how to fix this? </p>
  
  <p>Here is the method:</p>
  
  <pre><code>    override fun removeFromIndex(context: IndexContext, providedAliases: List&lt;String&gt;?) {
          val aliasesToRemove = providedAliases ?: getByIndex(context)
          val params: Map&lt;String, String&gt; = emptyMap()
  
          for (alias in aliasesToRemove) {
              val jsonString = IndexToAliasModel(context.index, alias).toJSONString("remove")
              val entity = NStringEntity(jsonString, ContentType.APPLICATION_JSON)
              esClientConf[context.cluster].performRequest("POST", "_aliases/", params, entity)
          }
      }
  </code></pre>
  
  <p>Here is the unit test:</p>
  
  <pre><code>    @Test
      fun `Removing aliases of an index performs a request`() {
          val context = IndexContext(ElasticsearchCluster.AUX, index="dummyIndex")
          val providedAliases = listOf("dummyAlias1")
          val esResponse = mockk&lt;Response&gt;()
  
          mockkConstructor(NStringEntity::class)
          val nStringEntity = mockk&lt;NStringEntity&gt;()
          every { NStringEntity(any(), ContentType.APPLICATION_JSON) } returns nStringEntity
          every { esClientConf[ElasticsearchCluster.AUX].performRequest(any(), any(), emptyMap&lt;String, String&gt;(), nStringEntity) } returns esResponse
  
          esAliasService.removeFromIndex(context, providedAliases)
  
          verify { esClientConf[ElasticsearchCluster.AUX].performRequest("POST", "_aliases/", emptyMap&lt;String, String&gt;(), nStringEntity) }
      }
  </code></pre>
  
  <p>I get the following error on <code>every { NStringEntity(any(), ContentType.APPLICATION_JSON) } returns nStringEntity</code> line:</p>
  
  <pre><code>io.mockk.MockKException: Failed matching mocking signature for
  
  left matchers: [any()]
  
      at io.mockk.impl.recording.SignatureMatcherDetector.detect(SignatureMatcherDetector.kt:99)
      at io.mockk.impl.recording.states.RecordingState.signMatchers(RecordingState.kt:39)
      at io.mockk.impl.recording.states.RecordingState.round(RecordingState.kt:31)
      at io.mockk.impl.recording.CommonCallRecorder.round(CommonCallRecorder.kt:50)
      at io.mockk.impl.eval.RecordedBlockEvaluator.record(RecordedBlockEvaluator.kt:59)
      at io.mockk.impl.eval.EveryBlockEvaluator.every(EveryBlockEvaluator.kt:30)
      at io.mockk.MockKDsl.internalEvery(API.kt:92)
      at io.mockk.MockKKt.every(MockK.kt:104)
  </code></pre>
  
  <p>(<code>esClientConf[context.cluster]</code> returns an Elasticsearch <code>RestClient</code>instance.)</p>