@Test
public void testPerQueueDisablePreemption() {

  int[][] qData = new int[][]{
      //  /    A    B    C
      { 100,  55,  25,  20 },  // abs
      { 100, 100, 100, 100 },  // maxCap
      { 100,   0,  54,  46 },  // used
      {  10,  10,   0,   0 },  // pending
      {   0,   0,   0,   0 },  // reserved
     //     appA appB appC
      {   3,   1,   1,   1 },  // apps
      {  -1,   1,   1,   1 },  // req granularity
      {   3,   0,   0,  0 },  // subqueues
    };
  schedConf.setPreemptionDisabled("root.queueB", true);
  ProportionalCapacityPreemptionPolicy policy = buildPolicy(qData);
  policy.editSchedule();
  // Since queueB is not preemptable, get resources from queueC
  verify(mDisp, times(10)).handle(argThat(new IsPreemptionRequestFor(appC)));
  verify(mDisp, never()).handle(argThat(new IsPreemptionRequestFor(appB)));
  // Since queueB is preemptable, resources will be preempted
  // from both queueB and queueC. Test must be reset so that the mDisp
  // event handler will count only events from the following test and not the
  // previous one.
  setup();
  schedConf.setPreemptionDisabled("root.queueB", false);
  ProportionalCapacityPreemptionPolicy policy2 = buildPolicy(qData);
  policy2.editSchedule();
  verify(mDisp, times(4)).handle(argThat(new IsPreemptionRequestFor(appB)));
  verify(mDisp, times(6)).handle(argThat(new IsPreemptionRequestFor(appC)));
}