title: Unit test for Spring MVC Controllers that use annotation @RequestParam
body: <p>How can I create a Unit test for Spring MVC Controllers that use annotation @RequestParam? I have created junit tests for controller that uses HttpServletRequest object in the handlerequest method, but I am looking a way to test a controller using @RequestParam.</p>
  
  <p>Thanks</p>
  
  <pre><code>@RequestMapping("/call.action")
  
  public ModelAndView getDBRecords(@RequestParam("id") String id) {
  
     Employee employee = service.retrieveEmployee(id);
  
  } 
  </code></pre>