One of the app in stack sends invalid content type. Currently it is impossible to cover this in Unit test because MockHttpServletRequestBuilder uses MediaType.parse(contentType: String).toString() to get the value and it fails to get to ExceptionHandler
I propose that MockHttpServletRequestBuilder could accept any string for contentType. In this case when we send payload with invalid(unparsable) contentType to our controller we will handle InvalidMediaTypeException with our exception handler in Unit tests
I suppose you can set the Content-Type header directly for the time being? Otherwise you could also modify the content type on the MockHttpServletRequest instance itself where no such parsing is in place.