@Test
public void testHandleDeserializerUpload() throws IOException {

    // Make a temp directory
    final Path tempDirectory = Files.createTempDirectory(null);
    // Create a "multi-part" file
    final String mockContent = "test content";
    final MockMultipartFile myFile = new MockMultipartFile(
        "data",
        "filename.txt",
        "text/plain",
        mockContent.getBytes(StandardCharsets.UTF_8)
    );
    final String outputFilename = "MyUpload.jar";
    final String expectedUploadedPath = tempDirectory.toString() + "/deserializers/" + outputFilename;
    // Create manager
    final UploadManager uploadManager = new UploadManager(tempDirectory.toString());
    // Handle the "upload"
    final String result = uploadManager.handleDeserializerUpload(myFile, outputFilename);
    // Validate
    assertEquals("Has expected result filename", expectedUploadedPath, result);
    // Validate contents
    final byte[] contentBytes = Files.readAllBytes(new File(result).toPath());
    final String contentString = new String(contentBytes, StandardCharsets.UTF_8);
    assertEquals("Contents are expected", mockContent, contentString);
}