Check out example codes for "test excel file java multipart". It will help you in understanding the concepts better.

Code Example 1

MultipartFile file = new MockMultipartFile("filename", "someTestFile.xls", "application/vnd.ms-excel", new ClassPathResource("someTestFile.xls").getInputStream());

Learn ReactJs, React Native from akashmittal.com