@Test
@SuppressWarnings("deprecation")
public void testParseThresholds() {

  // Defaults vary by number of queues
  Configuration conf = new Configuration();
  scheduler = new DecayRpcScheduler(1, "ipc.5", conf);
  assertEqualDecimalArrays(new double[]{}, scheduler.getThresholds());
  scheduler = new DecayRpcScheduler(2, "ipc.6", conf);
  assertEqualDecimalArrays(new double[]{0.5}, scheduler.getThresholds());
  scheduler = new DecayRpcScheduler(3, "ipc.7", conf);
  assertEqualDecimalArrays(new double[]{0.25, 0.5}, scheduler.getThresholds());
  scheduler = new DecayRpcScheduler(4, "ipc.8", conf);
  assertEqualDecimalArrays(new double[]{0.125, 0.25, 0.5}, scheduler.getThresholds());
  // Custom
  conf = new Configuration();
  conf.set("ipc.9." + DecayRpcScheduler.IPC_FCQ_DECAYSCHEDULER_THRESHOLDS_KEY,
    "1, 10, 20, 50, 85");
  scheduler = new DecayRpcScheduler(6, "ipc.9", conf);
  assertEqualDecimalArrays(new double[]{0.01, 0.1, 0.2, 0.5, 0.85}, scheduler.getThresholds());
}