public void testQualifiedByAttributesWithCustomQualifierRegistered() {
StaticApplicationContext context = new StaticApplicationContext();
BeanDefinitionReader reader = new XmlBeanDefinitionReader(context);
reader.loadBeanDefinitions(CONFIG_LOCATION);
QualifierAnnotationAutowireCandidateResolver resolver = (QualifierAnnotationAutowireCandidateResolver)
context.getDefaultListableBeanFactory().getAutowireCandidateResolver();
resolver.addQualifierType(MultipleAttributeQualifier.class);
context.registerSingleton("testBean", QualifiedByAttributesTestBean.class);
context.refresh();
QualifiedByAttributesTestBean testBean = (QualifiedByAttributesTestBean) context.getBean("testBean");
Person moeSenior = testBean.getMoeSenior();
Person moeJunior = testBean.getMoeJunior();