GenericWebApplicationContext wac = new GenericWebApplicationContext();
wac.registerBeanDefinition("controller", new RootBeanDefinition(VariableNamesController.class));
RootBeanDefinition mappingDef = new RootBeanDefinition(DefaultAnnotationHandlerMapping.class);
mappingDef.getPropertyValues().add("useDefaultSuffixPattern", false);
wac.registerBeanDefinition("handlerMapping", mappingDef);
wac.refresh();
return wac;
}
};
servlet.init(new MockServletConfig());