### Question:
CalculationTask implements ImmutableBean { @SuppressWarnings("unchecked") public CalculationResults execute(ScenarioMarketData marketData, ReferenceData refData) { Map<Measure, Result<?>> results = calculate(marketData, refData); ScenarioFxRateProvider fxProvider = parameters.findParameter(FxRateLookup.class) .map(lookup -> LookupScenarioFxRateProvider.of(marketData, lookup)) .orElse(ScenarioFxRateProvider.of(marketData)); ImmutableList.Builder<CalculationResult> resultBuilder = ImmutableList.builder(); for (CalculationTaskCell cell : cells) { resultBuilder.add(cell.createResult(this, target, results, fxProvider, refData)); } return CalculationResults.of(target, resultBuilder.build()); } private  CalculationTask(
      CalculationTarget target,
      CalculationFunction<CalculationTarget> function,
      CalculationParameters parameters,
      List<CalculationTaskCell> cells); static CalculationTask of(
      CalculationTarget target,
      CalculationFunction<? extends CalculationTarget> function,
      CalculationTaskCell... cells); static CalculationTask of(
      CalculationTarget target,
      CalculationFunction<? extends CalculationTarget> function,
      CalculationParameters parameters,
      List<CalculationTaskCell> cells); int getRowIndex(); Set<Measure> getMeasures(); @SuppressWarnings("unchecked") MarketDataRequirements requirements(ReferenceData refData); Currency naturalCurrency(ReferenceData refData); @SuppressWarnings("unchecked") CalculationResults execute(ScenarioMarketData marketData, ReferenceData refData); @Override String toString(); static TypedMetaBean<CalculationTask> meta(); @Override TypedMetaBean<CalculationTask> metaBean(); CalculationTarget getTarget(); CalculationFunction<CalculationTarget> getFunction(); CalculationParameters getParameters(); List<CalculationTaskCell> getCells(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void execute() { SupplierFunction<String> fn = SupplierFunction.of(() -> "foo"); CalculationTaskCell cell = CalculationTaskCell.of(0, 0, TestingMeasures.PRESENT_VALUE, REPORTING_CURRENCY_USD); CalculationTask task = CalculationTask.of(TARGET, fn, cell); ScenarioMarketData marketData = ImmutableScenarioMarketData.builder(date(2011, 3, 8)).build(); CalculationResults calculationResults = task.execute(marketData, REF_DATA); Result<?> result = calculationResults.getCells().get(0).getResult(); assertThat(result).hasValue(ScenarioArray.of("foo")); }