GenericWebApplicationContext wac = new GenericWebApplicationContext();
RootBeanDefinition mapping = new RootBeanDefinition(ControllerClassNameHandlerMapping.class);
mapping.getPropertyValues().addPropertyValue("excludedPackages", null);
wac.registerBeanDefinition("handlerMapping", mapping);
wac.registerBeanDefinition("controller", new RootBeanDefinition(MethodNameDispatchingController.class));
wac.refresh();
return wac;
}
};
servlet.init(new MockServletConfig());