ComponentDescriptorFactory { @Deprecated public <T> List<ComponentDescriptor<T>> createComponentDescriptors(Class<? extends T> componentClass, Class<?> componentRoleClass) { return createComponentDescriptors(componentClass, (Type) componentRoleClass); }  @Deprecated List<ComponentDescriptor<T>> createComponentDescriptors(Class<? extends T> componentClass,
        Class<?> componentRoleClass); List<ComponentDescriptor<T>> createComponentDescriptors(Class<? extends T> componentClass,
        Type componentRoleType);  }
@Test void multipleRolesForComponent() { ComponentDescriptorFactory factory = new ComponentDescriptorFactory(); List<ComponentDescriptor<MultipleRolesImpl>> descriptors = factory.createComponentDescriptors(MultipleRolesImpl.class, NonGenericRole.class); assertEquals(2, descriptors.size()); assertEquals("hint1", descriptors.get(0).getRoleHint()); assertEquals("hint2", descriptors.get(1).getRoleHint()); }
@Test void singletonAnnotationForComponent() { ComponentDescriptorFactory factory = new ComponentDescriptorFactory(); List<ComponentDescriptor<SingletonImpl>> descriptors = factory.createComponentDescriptors(SingletonImpl.class, NonGenericRole.class); assertEquals(1, descriptors.size()); assertEquals(ComponentInstantiationStrategy.SINGLETON, descriptors.get(0).getInstantiationStrategy()); }
@Test void namedAnnotationForComponent() { ComponentDescriptorFactory factory = new ComponentDescriptorFactory(); List<ComponentDescriptor<SpecialImpl>> descriptors = factory.createComponentDescriptors(SpecialImpl.class, NonGenericRole.class); assertEquals(1, descriptors.size()); assertEquals("special", descriptors.get(0).getRoleHint()); }