values.putValue(testValueId, MarketDataRequirementNames.MARKET_VALUE, new ValueSnapshot(marketValue));
return values;
}
private UserMarketDataSnapshot createSnapshot() {
final StructuredMarketDataSnapshot snapshot = mock(StructuredMarketDataSnapshot.class);
final UniqueId snapshotId = UniqueId.of("TestSnapshot", "1");
final ExternalId testValueId = ExternalId.of("TestScheme", "Value1");
when(snapshot.getUniqueId()).thenReturn(snapshotId);
when(snapshot.getGlobalValues()).thenReturn(generateUnstructured(testValueId, 234d));
final UserMarketDataSnapshot userSnapshot = new UserMarketDataSnapshot(snapshot);
userSnapshot.init();
final YieldCurveSnapshot yieldCurveSnapshot = mock(YieldCurveSnapshot.class);
when(yieldCurveSnapshot.getValues()).thenReturn(generateUnstructured(testValueId, 123d));
final Map<YieldCurveKey, YieldCurveSnapshot> yieldCurveMap = ImmutableMap.of(new YieldCurveKey(Currency.USD, "testCurve"), yieldCurveSnapshot);
when(snapshot.getYieldCurves()).thenReturn(yieldCurveMap);
return userSnapshot;
}