/**
* Create and persist a uniform OneToMany tree with given fan out.
*/
private TreeNode createTreeNodeEntities(int[] original) {
TreeNode root = new TreeNode();
root.createTree(original);
assertArrayEquals(original, root.getFanOuts());
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
em.persist(root);
em.getTransaction().commit();