@Test
public void testParseMyBean1() {

    Bean bean = new Bean(MyBean1.class, blueprint);
    bean.resolveDependency(blueprint);
    assertEquals(MyBean1.class, bean.clazz);
    assertEquals("myBean1", bean.id); // Name derived from class name
    assertEquals(2, getPersistenceFields(bean).size());
    assertEquals(Sets.newHashSet("em", "emf"), getPersistenceFields(bean));
    assertEquals(1, bean.properties.size());
    assertEquals("singleton", bean.attributes.get("scope"));
    Property prop = bean.properties.iterator().next();
    assertEquals("bean2", prop.name);
    assertEquals("serviceA", prop.ref);
    Set<TransactionalDef> expectedTxs = Sets.newHashSet(new TransactionalDef("*", "RequiresNew"),
            new TransactionalDef("txNotSupported", "NotSupported"),
            new TransactionalDef("txMandatory", "Mandatory"),
            new TransactionalDef("txNever", "Never"),
            new TransactionalDef("txRequired", "Required"),
            new TransactionalDef("txOverridenWithRequiresNew", "RequiresNew"),
            new TransactionalDef("txSupports", "Supports"));
    assertEquals(expectedTxs, getTransactionalDefs(bean));
}