Package org.springframework.test.web.client

# Interface MockRestServiceServer.MockRestServiceServerBuilder

Enclosing class:
  MockRestServiceServer

public static interface MockRestServiceServer.MockRestServiceServerBuilder
Builder to create a `MockRestServiceServer`.

## Method Summary

Modifier and Type
Method
Description
`MockRestServiceServer.MockRestServiceServerBuilder`
`bufferContent()`
Use the `BufferingClientHttpRequestFactory` wrapper to buffer the input and output streams, and for example, allow multiple reads of the response body.
`MockRestServiceServer`
`build()`
Build the `MockRestServiceServer` and set up the underlying `RestTemplate` with a `ClientHttpRequestFactory` that creates mock requests.
`MockRestServiceServer`
`build(RequestExpectationManager manager)`
An overloaded build alternative that accepts a custom `RequestExpectationManager`.
`MockRestServiceServer.MockRestServiceServerBuilder`
`ignoreExpectOrder(boolean ignoreExpectOrder)`
Whether to allow expected requests to be executed in any order not necessarily matching the order of declaration.

## Method Details

### ignoreExpectOrder

MockRestServiceServer.MockRestServiceServerBuilder ignoreExpectOrder(boolean ignoreExpectOrder)
Whether to allow expected requests to be executed in any order not necessarily matching the order of declaration.

Effectively a shortcut for:
`builder.build(new UnorderedRequestExpectationManager)`.

By default this is set to `false`

Parameters:
  `ignoreExpectOrder` - whether to ignore the order of expectations

### bufferContent

MockRestServiceServer.MockRestServiceServerBuilder bufferContent()
Use the `BufferingClientHttpRequestFactory` wrapper to buffer the input and output streams, and for example, allow multiple reads of the response body.

Since:
  5.0.5

### build

MockRestServiceServer build()
Build the `MockRestServiceServer` and set up the underlying `RestTemplate` with a `ClientHttpRequestFactory` that creates mock requests.

### build

MockRestServiceServer build(RequestExpectationManager manager)
An overloaded build alternative that accepts a custom `RequestExpectationManager`.