/**
* Tests marshaler handling of entity circular referencing.
* @throws Exception Upon failure
*/
public void testCircularEntity() throws Exception {
final TestPersistenceUnitEntityGraphBuilder entityGraphBuilder =
new TestPersistenceUnitEntityGraphBuilder(getEntityBeanFactory());
final EntityGraph entityGraph = new EntityGraph();
entityGraphBuilder.setEntityGraph(entityGraph);
entityGraphBuilder.populateEntityGraph();
final Marshaler marshaler = getMarshaler();
// wire up a circular entity
final Collection<Account> accounts = entityGraph.getEntitiesByType(Account.class);
// NOTE: we expect 3 of them per test-persistence-unit jar