@Override
protected Set<ComputedValue> getResult(final InstrumentDerivative fxDigital, final ForexOptionDataBundle<?> data, final ComputationTarget target,
final Set<ValueRequirement> desiredValues, final FunctionInputs inputs, final ValueSpecification spec, final FunctionExecutionContext executionContext) {
final String spreadName = Iterables.getOnlyElement(desiredValues).getConstraint(CalculationPropertyNamesAndValues.PROPERTY_CALL_SPREAD_VALUE);
final double spread = Double.parseDouble(spreadName);
final PresentValueCallSpreadBlackForexCalculator calculator = new PresentValueCallSpreadBlackForexCalculator(spread);
final MultipleCurrencyAmount result = fxDigital.accept(calculator, data);
final CurrencyAmount ca = result.getCurrencyAmounts()[0];
final String expectedCurrency = spec.getProperty(ValuePropertyNames.CURRENCY);
if (!expectedCurrency.equals(ca.getCurrency().getCode())) {
throw new OpenGammaRuntimeException("Expected currency " + expectedCurrency + " does not equal result currency " + ca.getCurrency());