title: Mockmvc put method is not working spring
body: <p>I am writing test cases for my spring restful services. We have a put service in the controller, the syntax is as follows</p>
  
  <pre><code>@RequestMapping(value="/update", method=RequestMethod.PUT)
  public @ResponseBody List&lt;PaidUpResponse&gt; updateStatus(
         @RequestBody @Valid PaidUpRequest paidUpRequest,
         HttpServletRequest request, HttpServletResponse response) {
  }
  </code></pre>
  
  <p>to write test case, I used the following method</p>
  
  <pre><code>mockMvc.perform(put("/update").contentType(UnitTestUtil.APPLICATION_JSON_UTF8)
              .content(UnitTestUtil.convertObjectToJsonBytes(request)))
              .andExpect(status().isOk());
  </code></pre>
  
  <p>but it is giving compilation error, saying 
  "The method put(String) is undefined". could you suggest me how to test put method?</p>