@Test
public void testParseNamedBean() {

    Bean bean = new Bean(ServiceAImpl1.class, blueprint);
    bean.resolveDependency(blueprint);
    String definedName = ServiceAImpl1.class.getAnnotation(Named.class).value();
    assertEquals("my1", definedName);
    assertEquals("Name should be defined using @Named", definedName, bean.id);
    assertEquals("There should be no persistence fields", 0, getPersistenceFields(bean).size());
    assertTrue("There should be no transaction definition", getTransactionalDefs(bean).isEmpty());
    assertEquals("There should be no properties", 0, bean.properties.size());
    assertEquals("prototype", bean.attributes.get("scope"));
}