### Question:
UpgradeHandler_V9 implements UpgradeHandler { @Override public void processDataMapDom(UpgradeUnit upgradeUnit) { Document document = upgradeUnit.getDocument(); Element dataMap = document.getDocumentElement(); dataMap.setAttribute("xmlns","http: dataMap.setAttribute("xsi:schemaLocation", "http: "https: dataMap.setAttribute("project-version", getVersion()); XPath xpath = XPathFactory.newInstance().newXPath(); try { Node reNode = (Node) xpath.evaluate("/data-map/reverse-engineering-config", document, XPathConstants.NODE); if (reNode != null) { String reFileName = ((Element) reNode).getAttribute("name") + ".xml"; String directoryPath = Util.toFile(upgradeUnit.getResource().getURL()).getParent(); File file = new File(directoryPath + "/" + reFileName); if (file.exists()) { if(!file.delete()) { logger.warn("Can't delete file " + file); } } dataMap.removeChild(reNode); } } catch (Exception ex) { logger.warn("Can't process dataMap DOM: ", ex); } }  @Override String getVersion(); @Override void processProjectDom(UpgradeUnit upgradeUnit); @Override void processDataMapDom(UpgradeUnit upgradeUnit);  }### Answer:
@Test public void testDataMapDomUpgrade() throws Exception { Document document = processDataMapDom("test-map-v8.map.xml"); Element root = document.getDocumentElement(); assertEquals("9", root.getAttribute("project-version")); assertEquals("http: assertEquals(0, root.getElementsByTagName("reverse-engineering-config").getLength()); assertEquals(2, root.getElementsByTagName("db-attribute").getLength()); }