private void validateYarnCapacitySchedulerProperties(Config csConfig, boolean before) {
    Map<String, String> csProps = csConfig.getProperties();

    assertTrue(csProps.containsKey(CAPACITY_SCHEDULER_ROOT_QUEUES));
    String[] split = csProps.get(CAPACITY_SCHEDULER_ROOT_QUEUES).split(",");
    if(before){
      assertEquals(1, split.length);
      assertEquals(YARN_DEFAULT_QUEUE, split[0]);
    } else{
      assertEquals(2, split.length);
      assertEquals(YARN_DEFAULT_QUEUE, split[0]);
      assertEquals(YARN_SYSTEM_SERVICE_QUEUE_NAME, split[1]);

      assertEquals("0",csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".capacity"));
      assertEquals("100",csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".maximum-capacity"));
      assertEquals("1",csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".user-limit-factor"));
      assertEquals("100",csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".minimum-user-limit-percent"));
      assertEquals("RUNNING",csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".state"));
      assertEquals("fifo",csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".ordering-policy"));
      assertEquals(ats_user,csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".acl_submit_applications"));
      assertEquals(ats_user,csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".acl_administer_queue"));
      assertEquals("0.5",csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".maximum-am-resource-percent"));
      assertEquals("true",csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".disable_preemption"));
      assertEquals("true",csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".intra-queue-preemption.disable_preemption"));
      assertEquals("32768",csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".priority"));
      assertEquals("-1",csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".maximum-application-lifetime"));
      assertEquals("-1",csProps.get(YARN_SYSTEM_SERVICE_QUEUE_PREFIX+".default-application-lifetime"));
    }
  }
Tests upgrade-related server side actions for YarnConfigCalculation
ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/YarnNodeManagerCapacityCalculationTest.java