I am writing a testing code using the Mockito.
I faced the TooManyActualInvocations error.

```
org.mockito.exceptions.verification.TooManyActualInvocations: 
mockView.enableProgressBar(0);
Wanted 1 time:
-> at com.MyPresenterTest.doSomething(MyPresenterTest.kt:160)
But was 2 times. Undesired invocation:
-> at com.MyPresenter.doSomething(MyPresenter.kt:195)

```

Here is my sample code:

```
class MyPresenter(val view: MyView) {

    fun doSomething() {
        view.enableProgressBar(0)
        view.enableProgressBar(1)
        view.enableProgressBar(2)
        view.enableProgressBar(0)
    }

}

```

And here is my testing code:

```
@Test
fun doSomethingTest() {
    myPresenter.doSomething()

    Mockito.verify(mockView).enableProgressBar(0)
    Mockito.verify(mockView).enableProgressBar(1)
    Mockito.verify(mockView).enableProgressBar(2)
    Mockito.verify(mockView).enableProgressBar(0)
}

```

If I remove this line or change the value from '0' to other value which is not duplicated, it works fine.

How can I fix this?