from the user guide:
context - an instance of MockRunContext that can hold dynamically user-defined properties. The context is service scoped, i.e. shared between all MockOperations/MockResponses for a MockService during its lifetime. Since this object implements the Map interface it can be accessed using Groovy's built-in collection support (see example screenshot above) |
So i think this one i could use to store the state of the service.
So the last issue to solve is to have a mock service which sends WS request by its self without incoming requests