@Controller
@PostMapping("/hello/{studentName}")
public ResponseEntity<Void> method1(
@RequestMapping(value = "/upload/{studentName}", method = RequestMethod.POST)
@ResponseBody
public String saveAuto(
@PathVariable(value = "name") String name,` `
@RequestParam("file") MultipartFile myFile) {
}
}
Hi, I am new to unit test. can anyone please help me for writing test case using mockmvcbuilderrequest.. I tried this but getting 404 mockMvc.perform(MockMvcRequestBuilders.multipart("/hello/{zoneName}","com.example") .file(file).accept(MediaType.MULTIPART_FORM_DATA_VALUE))