### Question:
DefaultUpgradeService implements UpgradeService { protected String loadProjectVersion(Resource resource) { RootTagHandler rootHandler = new RootTagHandler(); URL url = resource.getURL(); try (InputStream in = url.openStream()) { XMLReader parser = Util.createXmlReader(); parser.setContentHandler(rootHandler); parser.setErrorHandler(rootHandler); parser.parse(new InputSource(in)); } catch (SAXException e) { } catch (Exception e) { throw new ConfigurationException("Error reading configuration from %s", e, url); } return rootHandler.projectVersion != null ? rootHandler.projectVersion : UNKNOWN_VERSION; } DefaultUpgradeService(@Inject List<UpgradeHandler> handlerList); @Override UpgradeMetaData getUpgradeType(Resource resource); @Override Resource upgradeProject(Resource resource); static final String UNKNOWN_VERSION; static final String MIN_SUPPORTED_VERSION; }### Answer:
@Test public void loadProjectVersion() throws Exception { assertEquals("3.2.1.0", upgradeService.loadProjectVersion(getResourceForVersion("3.2.1.0"))); assertEquals("10", upgradeService.loadProjectVersion(getResourceForVersion("10"))); }