title: How to mock a top-level-function in kotlin with jmockit
body: <p>Assuming the I have a function to be test below, declare at the file named "Utils.kt"</p>
  
  <pre><code>//Utils.kt
  fun doSomething() = 1
  </code></pre>
  
  <p>Then we create a test class to test it  </p>
  
  <pre><code>//UtilsTest.kt
  @RunWith(JMockit::class)
  class UtilsTest {
      @Test
      fun testDoSomething() {
          object : Expectation() {
              init {
                  doSomething()
                  result = 2
              }
          }
  
          assertEquals(2, doSomething())
      }
  }
  </code></pre>
  
  <p>I want to mock <code>doSomething</code>, make it return <code>2</code>, but it won't work, actual result is <code>1</code></p>
  
  <p>Is there any workaround for this purpose?</p>