Mock in kotlin

Argument Matching & Answers For example, you have mocked DOC with call(arg: Int): Intfunction. You want to return 1 if argument is greater than 5 and -1 if it is less or equal to 5. This can be achieved by following construct: every { } returns 1 every {, eq(5))) } returns -1 returnsMany specify a number of values that are used one by one i.e. first matched call returns first element, second — second element, e. []
Kotlin  Mock