Is it possible to use MockMCV to compare the actual ResponseEntity and the one returned from the controller?
@Test
public void testStatusGetAllCars() throws Exception {
ResponseEntity<?> expectedResponse = carController.getAllCars();
mockMVC.perform(MockMvcRequestBuilders.get("/api/cars"))
.andDo(MockMvcResultHandlers.print())
.andExpect(MockMvcResultMatchers.status().isOk())
.andExpect(MockMvcResultMatchers.content().contentType("application/hal+json;charset=UTF-8"))
.andExpect( /// compare goes here // );
}