title: Mock object in Android Unit test with kotlin - any() gives null
body: <p>I'm trying to test my classes and I need to mock a <code>static</code> class. My code is the following:</p>
  <pre><code>PowerMockito.mockStatic(ToolTipUtil::class.java)
  PowerMockito.`when`(ToolTipUtil.wasToolTipShown(any(Context::class.java), &quot;&quot;)).thenReturn(true)
  val context = mock(Context::class.java)
  presenter.onResume(context)
  verify(view).setMenuButtonShown(eq(false))
  </code></pre>
  <p>But in the second line it throws an error:</p>
  <pre><code>&quot;java.lang.IllegalStateException: any(Context::class.java) must not be null&quot;
  </code></pre>
  <p>I've tried with <a href="https://github.com/nhaarman/mockito-kotlin" rel="nofollow noreferrer">mockito-kotlin</a> and <a href="https://medium.com/@elye.project/befriending-kotlin-and-mockito-1c2e7b0ef791" rel="nofollow noreferrer">befriending-kotlin-and-mockito</a> with no exit. Do you know how to fix it?</p>