open fun expect(matcher: RequestMatcher): ResponseActions
Set up an expectation for a single HTTP request. The returned ResponseActions can be used to set up further expectations as well as to define the response.
This method may be invoked any number times before starting to make request through the underlying RestTemplate in order to set up all expected requests.
Return
a representation of the expectation
open fun expect(count: ExpectedCount, matcher: RequestMatcher): ResponseActions
An alternative to #expect(RequestMatcher) with an indication how many times the request is expected to be executed.
When request expectations have an expected count greater than one, only the first execution is expected to match the order of declaration. Subsequent request executions may be inserted anywhere thereafter.
Return
a representation of the expectation
Since
4.3