Code example for XmlBeanFactory

0
     
    private XmlBeanFactory context;
     
    @Before 
    public void setUp() { 
        context = new XmlBeanFactory(new ClassPathResource("test-intercept-handlers-context.xml"));
    } 
     
    @Test
    public void testCreateFlipHandlerAspect() { 
        assertTrue(context.containsBeanDefinition(FlipSpringAspect.ASPECT_BEAN_NAME));
        BeanDefinition flipHandlerAspectBeanDefinition = context.getBeanDefinition(FlipSpringAspect.ASPECT_BEAN_NAME);
        MutablePropertyValues properties = flipHandlerAspectBeanDefinition.getPropertyValues();
        assertEquals(FlipSpringAspect.class.getName(), flipHandlerAspectBeanDefinition.getBeanClassName());
         
        FlipSpringAspect aspect = context.getBean(FlipSpringAspect.ASPECT_BEAN_NAME, FlipSpringAspect.class);
        assertNotNull(aspect.getFeatureService());
        assertNotNull(aspect.getDefaultValue());
        assertEquals("test", aspect.getDefaultValue());
         
Connect your IDE to all the code out there  Get Codota for Java