@Test
public void testUpload() throws Exception{

    MockMultipartFile jsonFile = new MockMultipartFile("role", "", "application/json","{\"id\":2,\"name\":\"ROLE_USER\"}".getBytes());
    MockMultipartFile file1 = new MockMultipartFile("file", "filename.txt", "text/plain", "content in file1".getBytes());
    MockMultipartFile file2 = new MockMultipartFile("file", "other-file.data", "text/plain", "content in file2".getBytes());
    mockMvc.perform(fileUpload("/mock/upload")
            .file(jsonFile)
            .file(file1).file(file2))
            .andExpect(status().is(200))
            .andExpect(content().string("success"));
}