public void test_resolve_trade() {
final OffsetDateTime now = OffsetDateTime.now();
final InMemorySecuritySource secSource = new InMemorySecuritySource();
final MockPositionSource posSource = new MockPositionSource();
final SimplePortfolio portfolio = new SimplePortfolio(UniqueId.of("Test", "1"), "Name");
final SimplePosition position = new SimplePosition(UniqueId.of("Test", "1"), new BigDecimal(1), ExternalIdBundle.EMPTY);
final SimpleTrade trade = new SimpleTrade(new SimpleSecurityLink(), new BigDecimal(1), new SimpleCounterparty(ExternalId.of("CPARTY", "C100")), now.toLocalDate(), now.toOffsetTime());
trade.setUniqueId(UniqueId.of("TradeScheme", "1"));
position.addTrade(trade);
portfolio.getRootNode().addPosition(position);
posSource.addPortfolio(portfolio);
final DefaultComputationTargetResolver test = new DefaultComputationTargetResolver(secSource, posSource);
final ComputationTargetSpecification spec = ComputationTargetSpecification.of(trade);
final ComputationTarget expected = new ComputationTarget(ComputationTargetType.TRADE, trade);