Reputation: 2491
Hopefully someone can help. I've been following this [online resource][1], attempting to write an integration test for a RestController:
@Test
public void obfiscated() throws Exception {
SearchRequest autoCompleteSearchrequest = new SearchRequest();
autoCompleteSearchrequest.setCity("somewheresville");
Upvotes: 1
Views: 417
Reputation: 2491
Despite my, admittedly false, belief that this is taken care of by the @SpringBootTest annotation; I took advice found in another question, and added @EnableWebMvc at class level for my test, and that fixed it.
Upvotes: 2
Reputation: 448
try adding consumes = MediaType.APPLICATION_JSON_VALUE
to your RequestMapping
Upvotes: 0