Class WrongInvocationOrderError

All Implemented Interfaces:
Serializable

public class WrongInvocationOrderError extends InteractionNotSatisfiedError
Thrown if an invocation on a mock object occurs too late. Example:
 when:
 ...

 then:
 1 * foo.me()
 1 * bar.me()

 then: // indicates that subsequent interactions must take place after previous interactions
 1 * baz.me()
 
Assuming the following invocation order:
  1. bar.me()
  2. baz.me()
  3. foo.me()
A WrongInvocationOrderError will be thrown on the third call.
See Also: