@Test
    public void beansNamePattern() {
        Properties properties = new Properties();
        properties.put(SpringBeansConfig.SPRING_BEANS_PREFIX + 1 + SpringBeansConfig.SPRING_BEANS_NAME_PATTERN_POSTFIX, "Target.*");
        properties.put(SpringBeansConfig.SPRING_BEANS_PREFIX + 2 + SpringBeansConfig.SPRING_BEANS_NAME_PATTERN_POSTFIX, "A.*");
        properties.put(SpringBeansConfig.SPRING_BEANS_PREFIX + 3 + SpringBeansConfig.SPRING_BEANS_NAME_PATTERN_POSTFIX, "B.*");
        properties.put(SpringBeansConfig.SPRING_BEANS_PREFIX + 4 + SpringBeansConfig.SPRING_BEANS_NAME_PATTERN_POSTFIX, "C.*");
        properties.put(SpringBeansConfig.SPRING_BEANS_PREFIX + 5 + SpringBeansConfig.SPRING_BEANS_NAME_PATTERN_POSTFIX, "antstyle:D*");
        properties.put(SpringBeansConfig.SPRING_BEANS_PREFIX + 6 + SpringBeansConfig.SPRING_BEANS_NAME_PATTERN_POSTFIX, "antstyle:E?");
        properties.put(SpringBeansConfig.SPRING_BEANS_PREFIX + 7 + SpringBeansConfig.SPRING_BEANS_NAME_PATTERN_POSTFIX, "antstyle:F.A*");
        properties.put(SpringBeansConfig.SPRING_BEANS_PREFIX + 8 + SpringBeansConfig.SPRING_BEANS_NAME_PATTERN_POSTFIX, "antstyle:.G*");

        ProfilerConfig config = ProfilerConfigLoader.load(properties);
        TargetBeanFilter filter = TargetBeanFilter.of(config);
        filter.clear();

        BeanDefinition beanDefinition = new RootBeanDefinition(String.class);
        assertTrue(filter.isTarget(SpringBeansTargetScope.COMPONENT_SCAN, "Target0", beanDefinition));
        assertTrue(filter.isTarget(SpringBeansTargetScope.COMPONENT_SCAN, "AAA", beanDefinition));
        assertTrue(filter.isTarget(SpringBeansTargetScope.COMPONENT_SCAN, "BBB", beanDefinition));
        assertTrue(filter.isTarget(SpringBeansTargetScope.COMPONENT_SCAN, "CCC", beanDefinition));
        assertTrue(filter.isTarget(SpringBeansTargetScope.COMPONENT_SCAN, "DDD", beanDefinition));
        assertFalse(filter.isTarget(SpringBeansTargetScope.COMPONENT_SCAN, "EEE", beanDefinition));
        assertTrue(filter.isTarget(SpringBeansTargetScope.COMPONENT_SCAN, "EE", beanDefinition));
        assertTrue(filter.isTarget(SpringBeansTargetScope.COMPONENT_SCAN, "F.AA", beanDefinition));
        assertTrue(filter.isTarget(SpringBeansTargetScope.COMPONENT_SCAN, ".GG", beanDefinition));
        assertFalse(filter.isTarget(SpringBeansTargetScope.COMPONENT_SCAN, "GG", beanDefinition));

        filter.addTransformed(String.class.getName());

        assertFalse(filter.isTarget(SpringBeansTargetScope.COMPONENT_SCAN, "Target0", beanDefinition));
        assertFalse(filter.isTarget(SpringBeansTargetScope.COMPONENT_SCAN, "Target1", beanDefinition));
    }
@author Jongho Moon
@author jaehong.kim
agent-module/plugins/spring/src/test/java/com/navercorp/pinpoint/plugin/spring/beans/interceptor/TargetBeanFilterTest.java