Normally when using mockito I will do something like
Mockito.when(myObject.myFunction(myParameter)).thenReturn(myResult);
Is it possible to do
Here is how it would look like in Kotlin with mockito-kotlin library.
mock { on { mockObject.myMethod(any()) } doAnswer { "Here is the value: ${it.arguments[0]}" } }