DependencyGraphTraceBuilderProperties { public DependencyGraphTraceBuilderProperties addMarketData(MarketDataSpecification marketData) { List<MarketDataSpecification> newMarketData = new ArrayList<>(getMarketData()); newMarketData.add(marketData); return marketData(newMarketData); } DependencyGraphTraceBuilderProperties(); private  DependencyGraphTraceBuilderProperties(DependencyGraphTraceBuilderProperties other); String getCalculationConfigurationName(); Instant getValuationTime(); VersionCorrection getResolutionTime(); ValueProperties getDefaultProperties(); Collection<ValueRequirement> getRequirements(); List<MarketDataSpecification> getMarketData(); DependencyGraphTraceBuilderProperties calculationConfigurationName(final String calculationConfigurationName); DependencyGraphTraceBuilderProperties resolutionTime(final VersionCorrection resolutionTime); DependencyGraphTraceBuilderProperties valuationTime(final Instant valuationTime); DependencyGraphTraceBuilderProperties defaultProperties(final ValueProperties defaultProperties); DependencyGraphTraceBuilderProperties addRequirement(ValueRequirement requirement); DependencyGraphTraceBuilderProperties requirements(final Collection<ValueRequirement> requirements); DependencyGraphTraceBuilderProperties marketData(final List<MarketDataSpecification> marketData); DependencyGraphTraceBuilderProperties addMarketData(MarketDataSpecification marketData); @Override String toString();  }
@Test public void addMarketData() { String snapshotId = "Foo~1"; UserMarketDataSpecification marketData = MarketData.user(UniqueId.parse(snapshotId)); final DependencyGraphTraceBuilderProperties builder1 = createBuilder(); List<MarketDataSpecification> defaultMD = builder1.getMarketData(); final DependencyGraphTraceBuilderProperties builder2 = builder1.addMarketData(marketData); assertEquals(defaultMD, builder1.getMarketData()); assertEquals(Lists.newArrayList(marketData), builder2.getMarketData()); }