setUp();
FSDirectory rootDir = getFs().getRootEntry().getDirectory();
log.debug("### testFSTreeWithRemount: rootDir=\n" + FSUtils.toString(rootDir, true));
FSEntry dir1 = rootDir.addDirectory(fileName);
assertNotNull("'" + fileName + "' not added", rootDir.getEntry(fileName));
log.debug("### testFSTreeWithRemount: before remountFS");
remountFS(config, getFs().isReadOnly());
log.debug("### testFSTreeWithRemount: after remountFS");
FSDirectory gotRootDir = getFs().getRootEntry().getDirectory();
assertNotNull("rootDir not saved", gotRootDir);
assertFalse("same ref (gotRootDir) after remount", gotRootDir == rootDir);
log.debug("### testFSTreeWithRemount: gotRootDir=\n" + FSUtils.toString(gotRootDir, true));
FSEntry gotDir1 = gotRootDir.getEntry(fileName);
log.debug("### testFSTreeWithRemount: after gotRootDir.getEntry");
assertNotNull("'" + fileName + "' not saved", gotDir1);
assertFalse("same ref (gotDir1) after remount", gotDir1 == dir1);
assertEquals("returned bad entry", dir1.getName(), gotDir1.getName());
}
}