### Question:
ResteasyEmbeddedServletInitializer implements BeanFactoryPostProcessor { public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { logger.debug("Post process bean factory has been called"); findJaxrsApplications(beanFactory); findJaxrsResourcesAndProviderClasses(beanFactory); if (allResources.size() == 0) { logger.warn("No JAX-RS resource Spring beans have been found"); } if (applications.size() == 0) { registerDefaultJaxrsApp(beanFactory); return; } BeanDefinitionRegistry registry = (BeanDefinitionRegistry) beanFactory; ConfigurableEnvironment configurableEnvironment = beanFactory.getBean(ConfigurableEnvironment.class); String servletMappingPrefix = configurableEnvironment.getProperty(SERVLET_MAPPING_PREFIX); if (servletMappingPrefix != null) { logger.info("resteasy.servlet.mapping.prefix specified. JAX-RS Applications will be mapped to {}", servletMappingPrefix); } for (Class<? extends Application> applicationClass : applications) { ApplicationPath path = AnnotationUtils.findAnnotation(applicationClass, ApplicationPath.class); if (path == null && servletMappingPrefix == null) { logger.warn("JAX-RS Application class {} has no ApplicationPath annotation, so it will not be registered", applicationClass.getName()); continue; } logger.debug("registering JAX-RS application class " + applicationClass.getName()); String effectivePath = servletMappingPrefix != null ? servletMappingPrefix : path.value(); GenericBeanDefinition applicationServletBean = createApplicationServlet(applicationClass, effectivePath); registry.registerBeanDefinition(applicationClass.getName(), applicationServletBean); } }  void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory);  }### Answer:
@Test public void postProcessBeanFactory() { Map<String, ServletRegistrationBean> servletRegistrationBeans = applicationContext.getBeansOfType(ServletRegistrationBean.class); Assert.assertNotNull(servletRegistrationBeans); Assert.assertEquals(servletRegistrationBeans.size(), 4); for(String applicationClassName : servletRegistrationBeans.keySet()) { testApplicaton(applicationClassName, servletRegistrationBeans.get(applicationClassName)); } Assert.assertNotNull(applicationContext.getBeansOfType(TestProviderNoBean.class)); Assert.assertNotNull(applicationContext.getBeansOfType(TestResourceNoBean.class)); }