@Test
public void testRestoreFromDiffCluster() throws Exception
{
populateBackupFileSystem("test_backup_new");
FakeConfiguration conf = (FakeConfiguration)injector.getInstance(IConfiguration.class);
conf.setRestorePrefix("RESTOREBUCKET/test_backup_new/"+FakeConfiguration.FAKE_REGION+"/fakecluster");
Restore restore = injector.getInstance(Restore.class);
cal.set(2011, Calendar.AUGUST, 11, 0, 30, 0);
cal.set(Calendar.MILLISECOND, 0);
Date startTime = cal.getTime();
cal.add(Calendar.HOUR, 5);
restore.restore(startTime, cal.getTime());
Assert.assertTrue(filesystem.downloadedFiles.contains(fileList.get(0)));
Assert.assertTrue(filesystem.downloadedFiles.contains(fileList.get(1)));
Assert.assertTrue(filesystem.downloadedFiles.contains(fileList.get(2)));
Assert.assertTrue(filesystem.downloadedFiles.contains(fileList.get(3)));
Assert.assertFalse(filesystem.downloadedFiles.contains(fileList.get(4)));
Assert.assertFalse(filesystem.downloadedFiles.contains(fileList.get(5)));
conf.setRestorePrefix("");
}