### Question:
UpgradeCatalog271 extends AbstractUpgradeCatalog { @Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); updateRangerLogDirConfigs(); updateRangerKmsDbUrl(); renameAmbariInfraService(); removeLogSearchPatternConfigs(); updateSolrConfigurations(); updateTimelineReaderAddress(); } @Inject  UpgradeCatalog271(Injector injector); @Override String getTargetVersion(); @Override String getSourceVersion();  }### Answer:
@Test public void testExecuteDMLUpdates() throws Exception { Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml"); Method updateRangerLogDirConfigs = UpgradeCatalog271.class.getDeclaredMethod("updateRangerLogDirConfigs"); Method updateRangerKmsDbUrl = UpgradeCatalog271.class.getDeclaredMethod("updateRangerKmsDbUrl"); Method renameAmbariInfraInConfigGroups = UpgradeCatalog271.class.getDeclaredMethod("renameAmbariInfraService"); Method removeLogSearchPatternConfigs = UpgradeCatalog271.class.getDeclaredMethod("removeLogSearchPatternConfigs"); Method updateSolrConfigurations = UpgradeCatalog271.class.getDeclaredMethod("updateSolrConfigurations"); Method updateTimelineReaderAddress = UpgradeCatalog271.class.getDeclaredMethod("updateTimelineReaderAddress"); UpgradeCatalog271 upgradeCatalog271 = createMockBuilder(UpgradeCatalog271.class) .addMockedMethod(updateRangerKmsDbUrl) .addMockedMethod(updateRangerLogDirConfigs) .addMockedMethod(addNewConfigurationsFromXml) .addMockedMethod(renameAmbariInfraInConfigGroups) .addMockedMethod(removeLogSearchPatternConfigs) .addMockedMethod(updateSolrConfigurations) .addMockedMethod(updateTimelineReaderAddress) .createMock(); upgradeCatalog271.addNewConfigurationsFromXml(); expectLastCall().once(); upgradeCatalog271.updateRangerLogDirConfigs(); expectLastCall().once(); upgradeCatalog271.updateRangerKmsDbUrl(); expectLastCall().once(); upgradeCatalog271.renameAmbariInfraService(); expectLastCall().once(); upgradeCatalog271.removeLogSearchPatternConfigs(); expectLastCall().once(); upgradeCatalog271.updateSolrConfigurations(); expectLastCall().once(); upgradeCatalog271.updateTimelineReaderAddress(); expectLastCall().once(); replay(upgradeCatalog271); upgradeCatalog271.executeDMLUpdates(); verify(upgradeCatalog271); }