### Question:
TargetTypeCalculationParameter implements CalculationParameter, ImmutableBean, Serializable { public static TargetTypeCalculationParameter of( Map<Class<?>, CalculationParameter> parameters, CalculationParameter defaultParameter) { ArgChecker.notEmpty(parameters, "values"); ArgChecker.notNull(defaultParameter, "defaultValue"); 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 TargetTypeCalculationParameter(queryType, ImmutableMap.copyOf(parameters), defaultParameter); } private  TargetTypeCalculationParameter(
      Class<? extends CalculationParameter> queryType,
      Map<Class<?>, CalculationParameter> parameters,
      CalculationParameter defaultParameter); static TargetTypeCalculationParameter of(
      Map<Class<?>, CalculationParameter> parameters,
      CalculationParameter defaultParameter); @Override Class<? extends CalculationParameter> queryType(); @Override Optional<CalculationParameter> filter(CalculationTarget target, Measure measure); static TypedMetaBean<TargetTypeCalculationParameter> meta(); @Override TypedMetaBean<TargetTypeCalculationParameter> metaBean(); Class<? extends CalculationParameter> getQueryType(); ImmutableMap<Class<?>, CalculationParameter> getParameters(); CalculationParameter getDefaultParameter(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void of_empty() { assertThatIllegalArgumentException() .isThrownBy(() -> TargetTypeCalculationParameter.of(ImmutableMap.of(), PARAM3)); }
@Test public void of_badType() { assertThatIllegalArgumentException() .isThrownBy(() -> TargetTypeCalculationParameter.of(ImmutableMap.of(TestTarget.class, PARAM_OTHER), PARAM3)); }
@Test public void coverage() { TargetTypeCalculationParameter test = TargetTypeCalculationParameter.of( ImmutableMap.of(TestTarget.class, PARAM1, TestTarget2.class, PARAM2), PARAM3); coverImmutableBean(test); TargetTypeCalculationParameter test2 = TargetTypeCalculationParameter.of( ImmutableMap.of(TestTarget.class, PARAM1), PARAM2); coverBeanEquals(test, test2); }