SimplePortfolioNode implements PortfolioNode, MutableUniqueIdentifiable, Serializable { @Override public List<PortfolioNode> getChildNodes() { if (DEBUG_FLAG) { if (_childNodes.size() > DEBUG_MAX_NODES) { return Collections.unmodifiableList(_childNodes.subList(0, DEBUG_MAX_NODES)); } } return Collections.unmodifiableList(_childNodes); } SimplePortfolioNode();  SimplePortfolioNode(String name);  SimplePortfolioNode(UniqueId uniqueId, String name);  SimplePortfolioNode(final PortfolioNode copyFrom); @Override UniqueId getUniqueId(); @Override void setUniqueId(UniqueId uniqueId); @Override UniqueId getParentNodeId(); void setParentNodeId(final UniqueId parentNodeId); @Override String getName(); void setName(String name); @Override int size(); @Override List<PortfolioNode> getChildNodes(); void addChildNode(PortfolioNode childNode); void addChildNodes(Collection<? extends PortfolioNode> childNodes); void removeChildNode(PortfolioNode childNode); @Override List<Position> getPositions(); void addPosition(Position position); void addPositions(Collection<? extends Position> positions); void removePosition(Position position); PortfolioNode getNode(UniqueId uniqueId); Position getPosition(UniqueId uniqueId); String toLongString(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); static PortfolioNode fromFudgeMsg(final FudgeDeserializer deserializer, final FudgeMsg message);  }
@Test(expectedExceptions=UnsupportedOperationException.class) public void test_getChildNodes_immutable() { SimplePortfolioNode test = new SimplePortfolioNode(UniqueId.of ("A", "test"), "test"); SimplePortfolioNode child = new SimplePortfolioNode(UniqueId.of ("A", "child"), "child"); test.getChildNodes().add(child); }