}
@SuppressWarnings("unchecked")
@Test
public void testUpload() throws Exception {
MockMultipartHttpServletRequestBuilder request = fileUpload("/router");
request.accept(MediaType.ALL).characterEncoding("UTF-8")
.session(new MockHttpSession());
request.param("extTID", "1");
request.param("extAction", "uploadService");
request.param("extMethod", "upload");
request.param("extType", "rpc");
request.param("name", "Ralph");
request.param("age", "20");
request.param("admin", "true");
request.param("salary", "12.3");
request.param("result", "theResult");
request.file("fileUpload", "the content of the file".getBytes());
MvcResult resultMvc = mockMvc.perform(request).andExpect(status().isOk())
.andExpect(content().contentType("text/html;charset=UTF-8"))
.andExpect(content().encoding("UTF-8")).andReturn();