ServletContext sc = configuration.getServletContext();
sc.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, this.ctx);
DefaultObjectFactory factory = new DefaultObjectFactory();
factory.init(configuration);
factory.addPostProcessor(new SpringInjectionPostProcessor());
PostProcessorTarget target = factory.newInstance(PostProcessorTarget.class);
Assert.assertNotNull(target.getBean());
}
///////////////////////////////////////////////////////////////////////////