@Test
public void testPerformDownloadOutputFileAlreadyExist() throws Exception
{

    File outputFile = new File(LOCAL_OUTPUT_FILE);
    // Create an output file to test file already exists.
    assertTrue(outputFile.createNewFile());
    // Try to perform the retention expiration export.
    try
    {
        retentionExpirationExporterController
            .performRetentionExpirationExport(NAMESPACE, BUSINESS_OBJECT_DEFINITION_NAME, outputFile, new RegServerAccessParamsDto(), UDC_SERVICE_HOSTNAME);
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals(String.format("The specified local output file \"%s\" already exists.", outputFile.toString()), e.getMessage());
    }
}