@Test
public void testPerformUploadInvalidLocalDir() throws Exception
{

    // Create uploader input manifest file in LOCAL_TEMP_PATH_INPUT directory
    File manifestFile = createManifestFile(LOCAL_TEMP_PATH_INPUT.toString(), getTestUploaderInputManifestDto());
    Assert.assertTrue(manifestFile.isFile());
    // Try to run upload by specifying a non-existing local directory.
    S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto = getTestS3FileTransferRequestParamsDto();
    s3FileTransferRequestParamsDto.setLocalPath(Paths.get(LOCAL_TEMP_PATH_INPUT.toString(), "I_DO_NOT_EXIST").toString());
    RegServerAccessParamsDto regServerAccessParamsDto =
        RegServerAccessParamsDto.builder().withRegServerHost(WEB_SERVICE_HOSTNAME).withRegServerPort(WEB_SERVICE_HTTPS_PORT).withUseSsl(true)
            .withUsername(WEB_SERVICE_HTTPS_USERNAME).withPassword(WEB_SERVICE_HTTPS_PASSWORD).build();
    try
    {
        uploaderController.performUpload(regServerAccessParamsDto, manifestFile, s3FileTransferRequestParamsDto, false, false, TEST_RETRY_ATTEMPTS,
            TEST_RETRY_DELAY_SECS);
        fail("Should throw an IllegalArgumentException when local directory does not exist.");
    }
    catch (IllegalArgumentException e)
    {
        assertTrue(e.getMessage().startsWith("Invalid local base directory"));
    }
}