*/
public void testLinkStandardFields() {
emfac = Persistence.createEntityManagerFactory("testStandardFieldLinking", dynamicOrgConfig);
em = emfac.createEntityManager();
EntityTransaction tx = em.getTransaction();
StandardFieldLinkingEntity entity = new StandardFieldLinkingEntity();
try {
tx.begin();
entity.setName(StandardFieldLinkingEntity.class.getSimpleName());
em.persist(entity);
Assert.assertTrue(em.contains(entity), "The entity was not stored to the database.");
tx.commit();
StandardFieldLinkingEntity retrieve = em.find(StandardFieldLinkingEntity.class, entity.getId());
Assert.assertEquals(retrieve.getName(), StandardFieldLinkingEntity.class.getSimpleName(),
"Entity was not retrieved properly.");
Set<Attribute<? super StandardFieldLinkingEntity, ?>> attributes =
em.getMetamodel().entity(StandardFieldLinkingEntity.class).getAttributes();
Set<Field> s = removeJDOFields(StandardFieldLinkingEntity.class);
Assert.assertEquals(attributes.size(), s.size(), "There was an unexpected number of attributes.");