@Test
  public void testUpdateHiveConfigs() throws Exception {

    Map<String, String> oldProperties = new HashMap<String, String>() {
      {
        put("hive.llap.zk.sm.keytab.file", "/etc/security/keytabs/hive.llap.zk.sm.keytab");
        put("hive.llap.daemon.keytab.file", "/etc/security/keytabs/hive.service.keytab");
        put("hive.llap.task.keytab.file", "/etc/security/keytabs/hive.llap.task.keytab");
      }
    };
    Map<String, String> newProperties = new HashMap<String, String>() {
      {
        put("hive.llap.zk.sm.keytab.file", "/etc/security/keytabs/hive.service.keytab");
        put("hive.llap.daemon.keytab.file", "/etc/security/keytabs/hive.service.keytab");
        put("hive.llap.task.keytab.file", "/etc/security/keytabs/hive.service.keytab");
      }
    };

    EasyMockSupport easyMockSupport = new EasyMockSupport();

    Clusters clusters = easyMockSupport.createNiceMock(Clusters.class);
    final Cluster cluster = easyMockSupport.createNiceMock(Cluster.class);
    Config mockHsiConfigs = easyMockSupport.createNiceMock(Config.class);

    expect(clusters.getClusters()).andReturn(new HashMap<String, Cluster>() {{
      put("normal", cluster);
    }}).once();
    expect(cluster.getDesiredConfigByType("hive-interactive-site")).andReturn(mockHsiConfigs).atLeastOnce();
    expect(mockHsiConfigs.getProperties()).andReturn(oldProperties).anyTimes();

    Injector injector = easyMockSupport.createNiceMock(Injector.class);
    expect(injector.getInstance(Gson.class)).andReturn(null).anyTimes();
    expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(null).anyTimes();

    replay(injector, clusters, mockHsiConfigs, cluster);

    AmbariManagementControllerImpl controller = createMockBuilder(AmbariManagementControllerImpl.class)
            .addMockedMethod("createConfiguration", ConfigurationRequest.class)
            .addMockedMethod("getClusters", new Class[] { })
            .addMockedMethod("createConfig", Cluster.class, StackId.class, String.class, Map.class,
                String.class, Map.class)
            .withConstructor(createNiceMock(ActionManager.class), clusters, injector)
            .createNiceMock();

    Injector injector2 = easyMockSupport.createNiceMock(Injector.class);
    Capture<Map> propertiesCapture = EasyMock.newCapture();

    expect(injector2.getInstance(AmbariManagementController.class)).andReturn(controller).anyTimes();
    expect(controller.getClusters()).andReturn(clusters).anyTimes();
    expect(controller.createConfig(anyObject(Cluster.class), anyObject(StackId.class), anyString(), capture(propertiesCapture), anyString(),
            anyObject(Map.class))).andReturn(createNiceMock(Config.class)).once();
    replay(controller, injector2);

    // This tests the update of HSI config 'hive.llap.daemon.keytab.file'.
    UpgradeCatalog260  upgradeCatalog260 = new UpgradeCatalog260(injector2);
    // Set 'isYarnKerberosDescUpdated' value to true, implying kerberos descriptor was updated.
    upgradeCatalog260.updateYarnKerberosDescUpdatedList("hive.llap.zk.sm.keytab.file");
    upgradeCatalog260.updateYarnKerberosDescUpdatedList("hive.llap.task.keytab.file");

    upgradeCatalog260.updateHiveConfigs();

    easyMockSupport.verifyAll();

    Map<String, String> updatedProperties = propertiesCapture.getValue();
    assertTrue(Maps.difference(newProperties, updatedProperties).areEqual());
  }
Sets expectations for DDL work on the
{@link UpgradeCatalog260#REPO_VERSION_TABLE}.

@param hiddenColumnCapture
@throws SQLException
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java