MockMvc - status expected:<200> but was:<302>
<p>The 302 error occurred during mockmvc test junit.
The redirect issue of insertBoard class,what should i do.
status expected:&lt;200> but was:&lt;302></p>

<pre><code>@RequestMapping(value="/sample/insertBoard.do")
public ModelAndView insertBoard(CommandMap commandMap,HttpServletRequest request) throws Exception{
    ModelAndView mv = ModelAndView("redirect:/sample/openBoardList.do");
    sampleService.insertBoard(commandMap.getMap(),request);
    return mv;
}

@Test
public void testInsertBoard() throws Exception{
    File fis = new File("c:\\users\\aaa.jpg");
    FileInputStream fi1 = new FileInputStream(fis);
    MockMultipartFile file = new MockMultipartFile("file",fis.getName(),"multipart/form-data",fi1);

    this.mockMvc.perform(MockMvcRequestBuilders.fileupload("/sample/insertBoard.do"))
                .file(file)
                .param("title","title_test")
                .param("contents","contents_test")
                .contentType(MediaType.MULTIPART_FORM_DATA)
                .andExpect(status().isOk());
}
</code></pre>