### Question:
TradeCounterpartyCalculationParameter implements CalculationParameter, ImmutableBean, Serializable { public static TradeCounterpartyCalculationParameter of( Map<StandardId, CalculationParameter> parameters, CalculationParameter defaultParameter) { ArgChecker.notEmpty(parameters, "values"); ArgChecker.notNull(defaultParameter, "defaultParameter"); Class<? extends CalculationParameter> queryType = defaultParameter.queryType(); for (CalculationParameter value : parameters.values()) { if (value.queryType() != queryType) { throw new IllegalArgumentException(Messages.format( "Map contained a parameter '{}' that did not match the expected query type '{}'", value, queryType.getClass().getSimpleName())); } } return new TradeCounterpartyCalculationParameter(queryType, ImmutableMap.copyOf(parameters), defaultParameter); } private  TradeCounterpartyCalculationParameter(
      Class<? extends CalculationParameter> queryType,
      Map<StandardId, CalculationParameter> parameters,
      CalculationParameter defaultParameter); static TradeCounterpartyCalculationParameter of(
      Map<StandardId, CalculationParameter> parameters,
      CalculationParameter defaultParameter); @Override Class<? extends CalculationParameter> queryType(); @Override Optional<CalculationParameter> filter(CalculationTarget target, Measure measure); static TypedMetaBean<TradeCounterpartyCalculationParameter> meta(); @Override TypedMetaBean<TradeCounterpartyCalculationParameter> metaBean(); Class<? extends CalculationParameter> getQueryType(); ImmutableMap<StandardId, CalculationParameter> getParameters(); CalculationParameter getDefaultParameter(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void of_empty() { assertThatIllegalArgumentException() .isThrownBy(() -> TradeCounterpartyCalculationParameter.of(ImmutableMap.of(), PARAM3)); }
@Test public void of_badType() { assertThatIllegalArgumentException() .isThrownBy(() -> TradeCounterpartyCalculationParameter.of(ImmutableMap.of(ID1, PARAM_OTHER), PARAM3)); }
@Test public void coverage() { TradeCounterpartyCalculationParameter test = TradeCounterpartyCalculationParameter.of( ImmutableMap.of(ID1, PARAM1, ID2, PARAM2), PARAM3); coverImmutableBean(test); TradeCounterpartyCalculationParameter test2 = TradeCounterpartyCalculationParameter.of( ImmutableMap.of(ID1, PARAM1), PARAM2); coverBeanEquals(test, test2); }