private void MigrateFreespace(IFreespaceManager oldFreespaceManager)
        {
            IFreespaceManager newFreespaceManager = AbstractFreespaceManager.CreateNew(this,
                                                                                       ConfigImpl.FreespaceSystem());

            newFreespaceManager.Start(0);
            SystemData().FreespaceSystem(ConfigImpl.FreespaceSystem());
            InstallFreespaceManager(newFreespaceManager);
            AbstractFreespaceManager.Migrate(oldFreespaceManager, newFreespaceManager);
            _fileHeader.WriteVariablePart(this);
        }
 public virtual void TestMigrateTo()
 {
     for (int from = 0; from < fm.Length; from++)
     {
         for (int to = 0; to < fm.Length; to++)
         {
             if (to != from)
             {
                 Clear(fm[from]);
                 Clear(fm[to]);
                 AbstractFreespaceManager.Migrate(fm[from], fm[to]);
                 AssertSame(fm[from], fm[to]);
                 fm[from].Free(new Slot(5, 10));
                 fm[from].Free(new Slot(100, 5));
                 fm[from].Free(new Slot(140, 27));
                 AbstractFreespaceManager.Migrate(fm[from], fm[to]);
                 AssertSame(fm[from], fm[to]);
             }
         }
     }
 }