XsdSchemaHandlerAdapter extends LocationTransformerObjectSupport implements HandlerAdapter, InitializingBean { @Override public long getLastModified(HttpServletRequest request, Object handler) { Source schemaSource = ((XsdSchema) handler).getSource(); return LastModifiedHelper.getLastModified(schemaSource); }  void setSchemaLocationExpression(String schemaLocationExpression); void setTransformSchemaLocations(boolean transformSchemaLocations); @Override long getLastModified(HttpServletRequest request, Object handler); @Override ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler); @Override boolean supports(Object handler); @Override void afterPropertiesSet(); static final String DEFAULT_SCHEMA_LOCATION_EXPRESSION; }
@Test public void getLastModified() throws Exception { Resource single = new ClassPathResource("single.xsd", getClass()); SimpleXsdSchema schema = new SimpleXsdSchema(single); schema.afterPropertiesSet(); long lastModified = single.getFile().lastModified(); assertEquals("Invalid last modified", lastModified, adapter.getLastModified(null, schema)); }