}
public void testInitFromUniverse() {
BasicUniverse3D universe3D = new BasicUniverse3D();
Universe universe = new MockUniverse();
MockTreeLeaf treeLeaf = new MockTreeLeaf();
treeLeaf.setState(CoreDataCreatorForTests.createSpecificTreeLeafState());
universe.addFallenLeaf(treeLeaf);
MockTree tree = new MockTree();
tree.setState(CoreDataCreatorForTests.createSpecificTreeState());
universe.addTree(tree);
universe3D.initFromUniverse(universe);
assertNotNull(universe3D.getLights());
Set<Node> elements3d = universe3D.getElements3D();
assertNotNull(elements3d);
assertEquals(3, elements3d.size());
// the 3D node is added to a transform group, itself added to a branch group
// that's why i test the parent of the parent
assertTrue(elements3d.contains(tree.getTree3D().getBranchGroup().getParent().getParent()));
assertTrue(elements3d.contains(treeLeaf.getTreeLeaf3D().getNode().getParent().getParent()));
}