### Question:
UpgradeHandler_V7 implements UpgradeHandler { @Override public void processModel(DataChannelDescriptor dataChannelDescriptor) { for (DataMap dataMap : dataChannelDescriptor.getDataMaps()) { for (ObjEntity objEntity : dataMap.getObjEntities()) { ObjEntity superEntity = objEntity.getSuperEntity(); if (superEntity != null) { removeShadowAttributes(objEntity, superEntity); } } } }  @Override String getVersion(); @Override void processProjectDom(UpgradeUnit upgradeUnit); @Override void processDataMapDom(UpgradeUnit upgradeUnit); @Override void processModel(DataChannelDescriptor dataChannelDescriptor);  }### Answer:
@Test public void testModelUpgrade() throws Exception { DataChannelDescriptor descriptor = mock(DataChannelDescriptor.class); DataMap map = new DataMap(); when(descriptor.getDataMaps()).thenReturn(Collections.singletonList(map)); ObjEntity superEntity = new ObjEntity("super"); superEntity.addAttribute(new ObjAttribute("super")); superEntity.addAttribute(new ObjAttribute("simple")); map.addObjEntity(superEntity); ObjEntity subEntity = new ObjEntity("sub"); subEntity.setSuperEntityName("super"); subEntity.addAttribute(new ObjAttribute("super")); subEntity.addAttribute(new ObjAttribute("simple_sub")); map.addObjEntity(subEntity); assertNotNull(superEntity.getDeclaredAttribute("super")); assertNotNull(subEntity.getDeclaredAttribute("super")); handler.processModel(descriptor); assertNotNull(superEntity.getDeclaredAttribute("super")); assertNull(subEntity.getDeclaredAttribute("super")); verify(descriptor).getDataMaps(); verifyNoMoreInteractions(descriptor); }