title: MockK - Failed matching mocking signature for left matchers: [any(), any()]
body: <p>I want to implement some UI Tests to assure that the code implemented today works for tomorrow but when trying to see if already UI tests implemented in the past works, it throws this error:</p>
  <p><code>Caused by: io.mockk.MockKException: Failed matching mocking signature for left matchers: [any(), any()]</code></p>
  <p>This happens on an <code>every {} return Unit</code> line which there's a <strong>object file called WakeUpTimeManager</strong>, that <strong>calls a .set(param1, param2)</strong> function and <strong>inside that function there are some inline functions</strong> which I think it could be causing the problem but I don't know. I tried searching on the internet but couldn't find a solution.</p>
  <p>Here's the test that throws the error:</p>
  <pre><code>  @Before
    fun setup() {
      mockkObject(WakeUpTimerManager)
      every { WakeUpTimerManager.set(any(), any()) } returns Unit
    }
  </code></pre>
  <p>Here's the function that is calling on <code>every</code> line</p>
  <pre><code>  fun set(context: Context, timer: Timer) {
      if (timer.atMillis &lt; System.currentTimeMillis()) {
        return
      }
  
      if (Preset.findByID(context, timer.presetID) == null) {
        return
      }
  
      //This is an inline function
      withGson {
        PreferenceManager.getDefaultSharedPreferences(context).edit {
          putString(PREF_WAKE_UP_TIMER, it.toJson(timer))
        }
      }
  
      //This is an inline function
      withAlarmManager(context) {
        it.setAlarmClock(
          AlarmManager.AlarmClockInfo(timer.atMillis, getPendingIntentForActivity(context)),
          getPendingIntentForService(context, timer)
        )
      }
    }
  </code></pre>
  <p><strong>Question:</strong> Why does mockk throw this error? What's going on? Is there any solution for this?</p>