new EntityBeanConverter(jdtFacade).addTableAnnotation(entityBean, entity);
}
public void testShouldAddTableAnnotation() throws Exception {
Mockery context = new Mockery();
final IJDTFacade jdtFacade = context.mock(IJDTFacade.class);
AppModule appModule = new TestFixture().getAppModule("basicentity-ejb-jar.xml", "basicentity-openejb-jar.xml");
Entity entity = appModule.getCmpMappings().getEntityMap().get("openejb.java.lang.Product");
EntityBean entityBean = (EntityBean) appModule.getEjbModules().get(0).getEjbJar().getEnterpriseBean("ProductEJB");
context.checking(new Expectations() {
{
Map<String,Object> properties = new HashMap<String, Object>();
properties.put("name", "products");
one(jdtFacade).addClassAnnotation("org.superbiz.ProductBean", Table.class, properties);
}