SpringXsdVersionResolver { public static String resolve() { final String fullVersion = SpringVersion.getVersion(); if (fullVersion != null) { final Matcher matcher = PATTERN.matcher(fullVersion); if (matcher.find()) { return matcher.group(0); } } LOGGER.trace("Could not resolve xsd version from Spring's version {}", fullVersion); return DEFAULT_VERSION; }  static String resolve();  }
@Test public void testResolve() { final String xsdVersion = SpringXsdVersionResolver.resolve(); Assert.assertThat(xsdVersion, equalTo("4.2")); }