public virtual void TestFairReservationSystemReinitialize()
        {
            ReservationSystemTestUtil.SetupFSAllocationFile(AllocFile);
            ReservationSystemTestUtil testUtil = new ReservationSystemTestUtil();
            // Setup
            RMContext mockRMContext = ReservationSystemTestUtil.CreateRMContext(conf);

            scheduler = ReservationSystemTestUtil.SetupFairScheduler(testUtil, mockRMContext,
                                                                     conf, 10);
            FairReservationSystem reservationSystem = new FairReservationSystem();

            reservationSystem.SetRMContext(mockRMContext);
            try
            {
                reservationSystem.Reinitialize(scheduler.GetConf(), mockRMContext);
            }
            catch (YarnException e)
            {
                NUnit.Framework.Assert.Fail(e.Message);
            }
            // Assert queue in original config
            string planQNam = testUtil.GetFullReservationQueueName();

            ReservationSystemTestUtil.ValidateReservationQueue(reservationSystem, planQNam);
            // Dynamically add a plan
            ReservationSystemTestUtil.UpdateFSAllocationFile(AllocFile);
            scheduler.Reinitialize(conf, mockRMContext);
            try
            {
                reservationSystem.Reinitialize(conf, mockRMContext);
            }
            catch (YarnException e)
            {
                NUnit.Framework.Assert.Fail(e.Message);
            }
            string newQueue = "root.reservation";

            ReservationSystemTestUtil.ValidateNewReservationQueue(reservationSystem, newQueue
                                                                  );
        }
        public virtual void TestFairReservationSystemInitialize()
        {
            ReservationSystemTestUtil.SetupFSAllocationFile(AllocFile);
            ReservationSystemTestUtil testUtil = new ReservationSystemTestUtil();
            // Setup
            RMContext mockRMContext = ReservationSystemTestUtil.CreateRMContext(conf);

            scheduler = ReservationSystemTestUtil.SetupFairScheduler(testUtil, mockRMContext,
                                                                     conf, 10);
            FairReservationSystem reservationSystem = new FairReservationSystem();

            reservationSystem.SetRMContext(mockRMContext);
            try
            {
                reservationSystem.Reinitialize(scheduler.GetConf(), mockRMContext);
            }
            catch (YarnException e)
            {
                NUnit.Framework.Assert.Fail(e.Message);
            }
            ReservationSystemTestUtil.ValidateReservationQueue(reservationSystem, testUtil.GetFullReservationQueueName
                                                                   ());
        }