ComputationTarget implements Serializable { public UniqueIdentifiable getValue() { return _value; } ComputationTarget(final PrimitiveComputationTargetType<?> type, final UniqueId value);  ComputationTarget(final ComputationTargetType type, final UniqueIdentifiable value);  ComputationTarget(final ComputationTargetSpecification specification, final UniqueIdentifiable value); ComputationTargetType getType(); UniqueIdentifiable getValue(); UniqueId getUniqueId(); ComputationTargetReference getContextSpecification(); ComputationTargetSpecification getLeafSpecification(); PortfolioNode getPortfolioNode(); Position getPosition(); Trade getTrade(); PositionOrTrade getPositionOrTrade(); Security getSecurity(); @SuppressWarnings("unchecked") T getValue(final ObjectComputationTargetType<T> type); String getName(); ComputationTargetSpecification toSpecification(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); static final ComputationTarget NULL; }
@Test(expectedExceptions = {IllegalStateException.class }) public void testGetValue_fail() { final ComputationTarget target = new ComputationTarget(ComputationTargetType.CURRENCY, Currency.GBP); target.getValue(ComputationTargetType.UNORDERED_CURRENCY_PAIR); }