modules/spring-mock-mvc/src/main/java/io/restassured/module/mockmvc/specification/MockMvcRequestSpecBuilder.java
public MockMvcRequestSpecBuilder setBody(Object object, ObjectMapper mapper) {
        spec.body(object, mapper);
        return this;
    }
public MockMvcRequestSpecBuilder setBody(Object object, ObjectMapper mapper) {
        spec.body(object, mapper);
        return this;
    }
public MockMvcRequestSpecBuilder setBody ( Object object , ObjectMapper mapper ) { spec . body ( object , mapper ) ; return this ; }
Specify an Object request content that will automatically be serialized to JSON or XML and sent with the request using a specific object mapper.
This works for the POST, PATCH and PUT methods only. Trying to do this for the other http methods will cause an exception to be thrown.
<p>
Note that {@link #setBody(Object, ObjectMapper)}
are the same except for the syntactic difference.
</p>

@param object The object to serialize and send with the request
@param mapper The object mapper
@return The request specification
Specify an Object request content that will automatically be serialized to JSON or XML and sent with the request using a specific object mapper . This works for the POST PATCH and PUT methods only . Trying to do this for the other http methods will cause an exception to be thrown . <p > Note that { @link #setBody ( Object ObjectMapper ) } are the same except for the syntactic difference . < / p >