title: java.lang.AssertionError: Status expected:<200> but was:<400>
body: <p>it's my controller...</p>
  
  <pre><code>@RequestMapping(value = "/user", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE, headers = "Accept=application/json")
  public @ResponseBody ResponseMessage getUser(@RequestBody AvailableUser uuid) {
      logger.info("enter into getuser method's body");
      return Manager.availableUser(uuid);
  }
  </code></pre>
  
  <p>it's my testcontroller...</p>
  
  <pre><code>@Test 
  public void testgetUser() throws Exception 
  {
      AvailableUser availableUser=new AvailableUser();
      List&lt;String&gt; lst =new ArrayList&lt;String&gt;();
      lst.add("test1");
      lst.add("test2");
      availableUser.setUuId(lst);
      this.mockMvc.perform(post("/user").contentType(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON))
          .andExpect(status().isCreated())
          .andExpect(status().isOk());
           when(Manager.availableUser(availableUser)).thenReturn(message);
  }
  </code></pre>
  
  <p>I don't know how to pass the object when controller method call <code>("/user")</code> form <code>testcontroller</code>.</p>
  
  <p>and I got error message <code>java.lang.AssertionError: Status expected:&lt;200&gt; but was:&lt;400&gt;</code></p>