PortfolioNodeTraverser { public static PortfolioNodeTraverser breadthFirst(final PortfolioNodeTraversalCallback callback) { return new BreadthFirstPortfolioNodeTraverser(callback); } protected  PortfolioNodeTraverser(final PortfolioNodeTraversalCallback callback); static PortfolioNodeTraverser depthFirst(final PortfolioNodeTraversalCallback callback); static PortfolioNodeTraverser breadthFirst(final PortfolioNodeTraversalCallback callback); static PortfolioNodeTraverser parallel(final PortfolioNodeTraversalCallback callback, final PoolExecutor executorService); PortfolioNodeTraversalCallback getCallback(); abstract void traverse(PortfolioNode portfolioNode);  }
@Test(groups = TestGroup.UNIT, enabled = false) public void testBreadthFirst() { final Callback cb = new Callback(); PortfolioNodeTraverser.breadthFirst(cb).traverse(createTestPortfolioNode(new AtomicInteger(), 2)); cb.assertVisitCount(); cb.assertVisit(NODE_PRE, 0); cb.assertVisit(POSITION_PRE, 19, 20); cb.assertVisit(NODE_PRE, 1, 10); cb.assertVisit(POSITION_PRE, 8, 9, 17, 18); cb.assertVisit(NODE_PRE, 2, 5, 11, 14); cb.assertVisit(POSITION_PRE, 3, 4, 6, 7, 12, 13, 15, 16); cb.assertVisit(POSITION_POST, 3, 4, 6, 7, 12, 13, 15, 16); cb.assertVisit(NODE_POST, 2, 5, 11, 14); cb.assertVisit(POSITION_POST, 8, 9, 17, 18); cb.assertVisit(NODE_POST, 1, 10); cb.assertVisit(POSITION_POST, 19, 20); cb.assertVisit(NODE_POST, 0); }