@Test
public void testUpload() throws Exception {

    Collection<File> files = generateFiles(1, 1, 1);
    // Dummy upload with compressed size.
    for (File file : files) {
        myFileSystem.uploadFile(
                file.toPath(),
                Paths.get(file.toString() + ".tmp"),
                getDummyPath(file.toPath()),
                2,
                true);
        // Verify the success metric for upload is incremented.
        Assert.assertEquals(1, (int) backupMetrics.getValidUploads().actualCount());
        // Verify delete of the original file if flag provided.
        Assert.assertFalse(file.exists());
        break;
    }
}