title: Incorrect Mock test, shows no errors but its not given accurate result ,why?
body: <pre><code> This is the controller class
  
  @RequestMapping(value="/remove", method=RequestMethod.POST)
      public String remove(
              @ModelAttribute("id") String id, Model model
      ) {
          bookService.removeOne(Long.parseLong(id.substring(8)));
          List&lt;Book&gt; bookList = bookService.findAll();
          model.addAttribute("bookList", bookList);
  
          return "redirect:/book/bookList";
      }
  </code></pre>
  
  <p>This is the controller test </p>
  
  <pre><code>    @Test
      public void bookRemoveTest() throws Exception {
          securityService.autologin("admin", "admin");
          Book book = new Book();
          book.setId(2L);
          book.setTitle("brekit");
          bookService.findOne(2L);
          mockMvc.perform(
                  post("/remove/2")
                          .accept(MediaType.APPLICATION_JSON)
                          .contentType(MediaType.APPLICATION_JSON)
          ).andDo(print())
                  .andReturn();
      }
  </code></pre>
  
  <h2>Results in no error but when I change the value on the URL it still shows correct test, its suppose to remove the said id, any suggestion guys ?</h2>
  
  <p>I have tried also this </p>
  
  <pre><code> @Test
      public void bookRemoveTest() throws Exception {
          securityService.autologin("admin", "admin");
          List&lt;Book&gt; bookList = bookService.findAll();
          Book book = new Book();
          book.setId(2L);
          book.setTitle("brekit");
          bookService.findOne(2L);
          MvcResult result = mockMvc
                  .perform(post("/remove/2")
                          .accept(MediaType.APPLICATION_JSON)
                          .contentType(MediaType.APPLICATION_JSON))
                          .andExpect(status().isOk())
                          .andReturn();
  
          String controllerResult = result.getResponse().getContentAsString();
          assertEquals(null, controllerResult);
      }
  </code></pre>
  
  <p>And I get the same error -assertion error? I'm new at this any suggestions ?</p>