### Question:
ImmutableScenarioMarketDataBuilder { public <T> ImmutableScenarioMarketDataBuilder addBox(MarketDataId<T> id, MarketDataBox<? extends T> value) { ArgChecker.notNull(id, "id"); ArgChecker.notNull(value, "value"); checkAndUpdateScenarioCount(value); values.put(id, value); return this; } ImmutableScenarioMarketDataBuilder(LocalDate valuationDate);   ImmutableScenarioMarketDataBuilder(MarketDataBox<LocalDate> valuationDate);   ImmutableScenarioMarketDataBuilder(
      int scenarioCount,
      MarketDataBox<LocalDate> valuationDate,
      Map<? extends MarketDataId<?>, MarketDataBox<?>> values,
      Map<? extends ObservableId, LocalDateDoubleTimeSeries> timeSeries); ImmutableScenarioMarketDataBuilder values(Map<? extends MarketDataId<?>, ?> values); ImmutableScenarioMarketDataBuilder timeSeries(Map<? extends ObservableId, LocalDateDoubleTimeSeries> timeSeries); ImmutableScenarioMarketDataBuilder addValue(MarketDataId<T> id, T value); ImmutableScenarioMarketDataBuilder addValueMap(Map<? extends MarketDataId<?>, ?> values); ImmutableScenarioMarketDataBuilder addScenarioValue(MarketDataId<T> id, List<? extends T> values); ImmutableScenarioMarketDataBuilder addScenarioValue(MarketDataId<T> id, ScenarioArray<? extends T> value); ImmutableScenarioMarketDataBuilder addScenarioValueMap(
      Map<? extends MarketDataId<?>, ? extends ScenarioArray<?>> values); ImmutableScenarioMarketDataBuilder addBox(MarketDataId<T> id, MarketDataBox<? extends T> value); ImmutableScenarioMarketDataBuilder addBoxMap(
      Map<? extends MarketDataId<?>, ? extends MarketDataBox<?>> values); ImmutableScenarioMarketDataBuilder addTimeSeries(ObservableId id, LocalDateDoubleTimeSeries timeSeries); ImmutableScenarioMarketDataBuilder addTimeSeriesMap(
      Map<? extends ObservableId, LocalDateDoubleTimeSeries> timeSeriesMap); ImmutableScenarioMarketData build();  }### Answer:
@Test public void test_addBadScenarioCount() { FxRateId eurGbpId = FxRateId.of(Currency.EUR, Currency.GBP); FxRateId eurUsdId = FxRateId.of(Currency.EUR, Currency.USD); FxRate eurGbpRate1 = FxRate.of(Currency.EUR, Currency.GBP, 0.8); FxRate eurGbpRate2 = FxRate.of(Currency.EUR, Currency.GBP, 0.9); FxRate eurGbpRate3 = FxRate.of(Currency.EUR, Currency.GBP, 0.95); FxRate eurUsdRate1 = FxRate.of(Currency.EUR, Currency.USD, 1.1); FxRate eurUsdRate2 = FxRate.of(Currency.EUR, Currency.USD, 1.2); ImmutableScenarioMarketDataBuilder builder = ImmutableScenarioMarketData.builder(VAL_DATE) .addBox(eurGbpId, MarketDataBox.ofScenarioValues(eurGbpRate1, eurGbpRate2, eurGbpRate3)); assertThatIllegalArgumentException() .isThrownBy(() -> builder.addBox(eurUsdId, MarketDataBox.ofScenarioValues(eurUsdRate1, eurUsdRate2))); }