p.put("movieDatabaseUnmanaged.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
p.put("movieDatabaseUnmanaged.JtaManaged", "false");
new InitialContext(p);
ResourceFactory rf = ResourceFactory.getInstance();
Class<TestBean> c = TestBean.class;
Field field = c.getField("emf");
EntityManagerFactory emf = (EntityManagerFactory) rf.getResourceReference(new ResourceReference(field.getDeclaringClass(),field.getName(),field.getType(),AnnotationUtil.hasOwbInjectableResource(field.getDeclaredAnnotations())));
Assert.assertNotNull( emf );
field = c.getField("em");
EntityManager em = (EntityManager) rf.getResourceReference(new ResourceReference(field.getDeclaringClass(),field.getName(),field.getType(),AnnotationUtil.hasOwbInjectableResource(field.getDeclaredAnnotations())));
Assert.assertNotNull( em );
}