PortfolioStructure { @Deprecated public PortfolioNode getRootPortfolioNode(final PortfolioNode node) { ArgumentChecker.notNull(node, "node"); return getRootPortfolioNodeImpl(node); } PortfolioStructure(final PositionSource positionSource); PositionSource getPositionSource(); PortfolioNode getParentNode(final PortfolioNode node); PortfolioNode getParentNode(final ComputationTarget position); @Deprecated PortfolioNode getRootPortfolioNode(final PortfolioNode node); @Deprecated PortfolioNode getRootPortfolioNode(final ComputationTarget position);  }
@Test(expectedExceptions = DataNotFoundException.class) public void test_getRootPortfolioNode_portfolioNode_badChild() { final PortfolioStructure resolver = getPortfolioStructure(); resolver.getRootPortfolioNode(_badChild); }
@Test(expectedExceptions = {IllegalArgumentException.class }) public void test_getRootPortfolioNode_position_badTarget() { final PortfolioStructure resolver = getPortfolioStructure(); resolver.getRootPortfolioNode(new ComputationTarget(ComputationTargetType.POSITION, _position1)); }
@Test(expectedExceptions = DataNotFoundException.class) public void test_getRootPortfolioNode_position_badChild() { final PortfolioStructure resolver = getPortfolioStructure(); resolver.getRootPortfolioNode(new ComputationTarget(new ComputationTargetSpecification(ComputationTargetType.PORTFOLIO_NODE, UniqueId.of("Invalid", "0")).containing( ComputationTargetType.POSITION, _badPosition.getUniqueId()), _badPosition)); }