3

When testing my endpoint with MockMvc, the tests are failing because my endpoint returns content type application/json, but MockHttpServletResponse is adding the charset option, then the test fails saying that application/json;charset=UTF-8 was found while expecting application/json.

Is this a bug, or is there a way to prevent that from happening?

My expectation is that MockHttpServletResponse should not be adding ;charset=UTF-8.

GreenSaguaro
  • 2,968
  • 2
  • 22
  • 41

0 Answers0