Method Barriers - ThorbenKuck/MockK-Method-Probing GitHub Wiki

The term "MethodBarrier" referrers to a barrier that blocks (or more precisely suspends) a Thread until another specified method has been called and exited.

Calling such a barrier looks like this:

barrier.tryToTraverse()

which suspends the calling thread until the barrier is resolved.

In this section you will find detailed explanations as to how you can use a method barrier.