I'm trying to test a method with this signature:
@RequestMapping(value="/Employee/{id}", method=RequestMethod.PUT, consumes="application/json")
@Transactional
public @ResponseBody Map update(@PathVariable Integer id,
@RequestBody HashMap<String, Object> information) {
}
The problem is that MockMvc param attributes accept only String parameters, is there a way to pass a HashMap
or an instance class object to the RequestBody as parameter?
When I try to pass a HashMap
as a string, I get a MismatchException.