### Question:
UpgradeCatalog251 extends AbstractUpgradeCatalog { @Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); updateKAFKAConfigs(); updateSTORMConfigs(); } @Inject  UpgradeCatalog251(Injector injector); @Override String getSourceVersion(); @Override String getTargetVersion();  }### Answer:
@Test public void testExecuteDMLUpdates() throws Exception { Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml"); Method updateKAFKAConfigs = UpgradeCatalog251.class.getDeclaredMethod("updateKAFKAConfigs"); Method updateSTORMConfigs = UpgradeCatalog251.class.getDeclaredMethod("updateSTORMConfigs"); UpgradeCatalog251 upgradeCatalog251 = createMockBuilder(UpgradeCatalog251.class) .addMockedMethod(addNewConfigurationsFromXml) .addMockedMethod(updateKAFKAConfigs) .addMockedMethod(updateSTORMConfigs) .createMock(); upgradeCatalog251.addNewConfigurationsFromXml(); expectLastCall().once(); Field field = AbstractUpgradeCatalog.class.getDeclaredField("dbAccessor"); field.set(upgradeCatalog251, dbAccessor); upgradeCatalog251.updateKAFKAConfigs(); expectLastCall().once(); upgradeCatalog251.updateSTORMConfigs(); expectLastCall().once(); replay(upgradeCatalog251, dbAccessor); upgradeCatalog251.executeDMLUpdates(); verify(upgradeCatalog251, dbAccessor); }