File hSEDatabaseFileHidden = new File(hSEDatabaseFile.getParentFile(), "HIDE_THIS_FILE_" + hSEDatabaseFile.getName());
hSEDatabaseFile.renameTo(hSEDatabaseFileHidden);
// 3. This shouldn't do anything; no new databases!
DownOperationResult downOperationResult = clientIH.down();
assertEquals(0, downOperationResult.getDownloadedUnknownDatabases().size());
clientIHtwo.down(); // same as IH!
// 4. Upload database from client "MOM" (later considered DIRTY)
clientMOM.createNewFile("fileMOM-1.jpg");
clientMOM.changeFile("file1.jpg");
clientMOM.up(upOptionsWithForce);
clientMOM.createNewFile("fileMOM-2.jpg");
clientMOM.up(upOptionsWithForce);
// 5. Download changes from "MOM" (apply databases and files that will later be DIRTY)
downOperationResult = clientIH.down();
assertEquals(0, downOperationResult.getDirtyDatabasesCreated().size());
clientIHtwo.down(); // same as IH!
// 6. Rename hidden database (= the later winner!)Now download the changes that
// Databases of client "MOM" will be considered "DIRTY"
hSEDatabaseFileHidden.renameTo(hSEDatabaseFile);
downOperationResult = clientIH.down();
assertEquals(2, downOperationResult.getDirtyDatabasesCreated().size());
clientIHtwo.down(); // same as IH!
// 7. This should remove DIRTY database versions from the database
// and ADD the multichunks from the previous database versions to the new database version (<< this is what kills MOM)