@Test
public void testSaveAuto() throws Exception {

    MockMultipartFile firstFile = new MockMultipartFile("data", "filename.txt", "text/plain","mock file test".getBytes());
      FileUtils.writeByteArrayToFile(new File("file.txt"), firstFile.getBytes());
    MockMultipartFile secondFile = new MockMultipartFile("data", "other-file-name.data", "text/plain", "some other type".getBytes());
    MockMultipartFile jsonFile = new MockMultipartFile("json", "", "application/json", "{\"json\": \"someValue\"}".getBytes());
    mockMvc.perform(MockMvcRequestBuilders.fileUpload("/upload").file(firstFile).file(secondFile).file(jsonFile)
            .param("random", "4")).andExpect(status().is(200)).andExpect(content().string("success"));
    System.out.println("=====================");
    files(firstFile, secondFile);
}