private static void updateQueue(QueueConfigInfo updateInfo,
                                  CapacitySchedulerConfiguration proposedConf,
                                  Map<String, String> confUpdate) {
    if (updateInfo == null) {
      return;
    }
    QueuePath queuePath = new QueuePath(updateInfo.getQueue());
    String keyPrefix = QueuePrefixes.getQueuePrefix(queuePath);
    for (Map.Entry<String, String> kv : updateInfo.getParams().entrySet()) {
      String keyValue = kv.getValue();
      if (keyValue == null || keyValue.isEmpty()) {
        proposedConf.unset(keyPrefix + kv.getKey());
        confUpdate.put(keyPrefix + kv.getKey(), null);
      } else {
        proposedConf.set(keyPrefix + kv.getKey(), keyValue);
        confUpdate.put(keyPrefix + kv.getKey(), keyValue);
      }
    }
  }
@Test
  public void testUpdateQueue() throws Exception {
    SchedConfUpdateInfo updateInfo = new SchedConfUpdateInfo();
    Map<String, String> updateMap = new HashMap<>();
    updateMap.put(CONFIG_NAME, A_CONFIG_VALUE);
    QueueConfigInfo queueAConfigInfo = new QueueConfigInfo(A_PATH, updateMap);
    updateInfo.getUpdateQueueInfo().add(queueAConfigInfo);

    Map<String, String> updateMapQueueB = new HashMap<>();
    updateMapQueueB.put(CONFIG_NAME, B_CONFIG_VALUE);
    QueueConfigInfo queueBConfigInfo = new QueueConfigInfo(B_PATH, updateMapQueueB);

    updateInfo.getUpdateQueueInfo().add(queueBConfigInfo);

    Map<String, String> configurationUpdate =
            ConfigurationUpdateAssembler.constructKeyValueConfUpdate(csConfig, updateInfo);

    assertEquals(A_CONFIG_VALUE, configurationUpdate.get(A_CONFIG_PATH));
    assertEquals(B_CONFIG_VALUE, configurationUpdate.get(B_CONFIG_PATH));
  }