/**
* Assert the request content type is compatible with the given
* content type as defined by {@link MediaType#isCompatibleWith(MediaType)}.
*/
public RequestMatcher contentTypeCompatibleWith(final MediaType contentType) {
return new RequestMatcher() {
@Override
public void match(ClientHttpRequest request) throws IOException, AssertionError {
MediaType actualContentType = request.getHeaders().getContentType();
assertTrue("Content type not set", actualContentType != null);
assertTrue("Content type [" + actualContentType + "] is not compatible with [" + contentType + "]",