@Test
public void testExecuteDMLUpdates() throws Exception {

  // TODO AMBARI-13001, readd unit test section.
  /*
  final DBAccessor dbAccessor = createNiceMock(DBAccessor.class);
  Configuration configuration = createNiceMock(Configuration.class);
  Connection connection = createNiceMock(Connection.class);
  Statement statement = createNiceMock(Statement.class);
  ResultSet resultSet = createNiceMock(ResultSet.class);
  expect(configuration.getDatabaseUrl()).andReturn(Configuration.JDBC_IN_MEMORY_URL).anyTimes();
  dbAccessor.getConnection();
  expectLastCall().andReturn(connection).anyTimes();
  connection.createStatement();
  expectLastCall().andReturn(statement).anyTimes();
  statement.executeQuery(anyObject(String.class));
  expectLastCall().andReturn(resultSet).anyTimes();
  // Technically, this is a DDL, but it has to be ran during the DML portion
  // because it requires the persistence layer to be started.
  UpgradeSectionDDL upgradeSectionDDL = new UpgradeSectionDDL();
  // Execute any DDL schema changes
  upgradeSectionDDL.execute(dbAccessor);
  // Begin DML verifications
  verifyBootstrapHDP21();
  // Replay main sections
  replay(dbAccessor, configuration, resultSet, connection, statement);
  AbstractUpgradeCatalog upgradeCatalog = getUpgradeCatalog(dbAccessor);
  Class<?> c = AbstractUpgradeCatalog.class;
  Field f = c.getDeclaredField("configuration");
  f.setAccessible(true);
  f.set(upgradeCatalog, configuration);
  */
  Method updateStormConfigs = UpgradeCatalog220.class.getDeclaredMethod("updateStormConfigs");
  Method updateAMSConfigs = UpgradeCatalog220.class.getDeclaredMethod("updateAMSConfigs");
  Method updateHDFSConfigs = UpgradeCatalog220.class.getDeclaredMethod("updateHDFSConfigs");
  Method updateKafkaConfigs = UpgradeCatalog220.class.getDeclaredMethod("updateKafkaConfigs");
  Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml");
  Method updateHbaseEnvConfig = UpgradeCatalog220.class.getDeclaredMethod("updateHbaseEnvConfig");
  Method updateFlumeEnvConfig = UpgradeCatalog220.class.getDeclaredMethod("updateFlumeEnvConfig");
  Method updateZookeeperLog4j = UpgradeCatalog220.class.getDeclaredMethod("updateZookeeperLog4j");
  Method updateHadoopEnvConfig = UpgradeCatalog220.class.getDeclaredMethod("updateHadoopEnv");
  Method updateAlertDefinitions = UpgradeCatalog220.class.getDeclaredMethod("updateAlertDefinitions");
  Method updateRangerEnvConfig = UpgradeCatalog220.class.getDeclaredMethod("updateRangerEnvConfig");
  Method updateRangerUgsyncSiteConfig = UpgradeCatalog220.class.getDeclaredMethod("updateRangerUgsyncSiteConfig");
  Method updateHiveConfig = UpgradeCatalog220.class.getDeclaredMethod("updateHiveConfig");
  Method updateAccumuloConfigs = UpgradeCatalog220.class.getDeclaredMethod("updateAccumuloConfigs");
  Method updateKerberosDescriptorArtifacts = AbstractUpgradeCatalog.class.getDeclaredMethod("updateKerberosDescriptorArtifacts");
  Method updateKnoxTopology = UpgradeCatalog220.class.getDeclaredMethod("updateKnoxTopology");
  UpgradeCatalog220 upgradeCatalog220 = createMockBuilder(UpgradeCatalog220.class)
    .addMockedMethod(updateAMSConfigs)
    .addMockedMethod(updateHDFSConfigs)
    .addMockedMethod(updateStormConfigs)
    .addMockedMethod(addNewConfigurationsFromXml)
    .addMockedMethod(updateHbaseEnvConfig)
    .addMockedMethod(updateFlumeEnvConfig)
    .addMockedMethod(updateAlertDefinitions)
    .addMockedMethod(updateKafkaConfigs)
    .addMockedMethod(updateZookeeperLog4j)
    .addMockedMethod(updateHadoopEnvConfig)
    .addMockedMethod(updateRangerEnvConfig)
    .addMockedMethod(updateRangerUgsyncSiteConfig)
    .addMockedMethod(updateHiveConfig)
    .addMockedMethod(updateAccumuloConfigs)
    .addMockedMethod(updateKerberosDescriptorArtifacts)
    .addMockedMethod(updateKnoxTopology)
    .createMock();
  upgradeCatalog220.updateHbaseEnvConfig();
  expectLastCall().once();
  upgradeCatalog220.updateFlumeEnvConfig();
  upgradeCatalog220.addNewConfigurationsFromXml();
  expectLastCall().once();
  upgradeCatalog220.updateStormConfigs();
  expectLastCall().once();
  upgradeCatalog220.updateHadoopEnv();
  expectLastCall().once();
  upgradeCatalog220.updateAMSConfigs();
  expectLastCall().once();
  upgradeCatalog220.updateAlertDefinitions();
  expectLastCall().once();
  upgradeCatalog220.updateKafkaConfigs();
  expectLastCall().once();
  upgradeCatalog220.updateHDFSConfigs();
  expectLastCall().once();
  upgradeCatalog220.updateZookeeperLog4j();
  expectLastCall().once();
  upgradeCatalog220.updateRangerEnvConfig();
  expectLastCall().once();
  upgradeCatalog220.updateRangerUgsyncSiteConfig();
  expectLastCall().once();
  upgradeCatalog220.updateHiveConfig();
  expectLastCall().once();
  upgradeCatalog220.updateAccumuloConfigs();
  expectLastCall().once();
  upgradeCatalog220.updateKnoxTopology();
  expectLastCall().once();
  upgradeCatalog220.updateKerberosDescriptorArtifacts();
  expectLastCall().once();
  replay(upgradeCatalog220);
  upgradeCatalog220.executeDMLUpdates();
  verify(upgradeCatalog220);
}