### Question:
CalibrationMeasures { public static CalibrationMeasures of(String name, List<? extends CalibrationMeasure<? extends ResolvedTrade>> measures) { return new CalibrationMeasures(name, measures); } private  CalibrationMeasures(String name, List<? extends CalibrationMeasure<? extends ResolvedTrade>> measures); static CalibrationMeasures of(String name, List<? extends CalibrationMeasure<? extends ResolvedTrade>> measures); @SafeVarargs static CalibrationMeasures of(String name, CalibrationMeasure<? extends ResolvedTrade>... measures); String getName(); ImmutableSet<Class<?>> getTradeTypes(); double value(ResolvedTrade trade, RatesProvider provider); DoubleArray derivative(ResolvedTrade trade, RatesProvider provider, List<CurveParameterSize> curveOrder); @Override String toString(); static final CalibrationMeasures PAR_SPREAD; static final CalibrationMeasures MARKET_QUOTE; static final CalibrationMeasures PRESENT_VALUE; }### Answer:
@Test public void test_of_duplicate() { assertThatIllegalArgumentException() .isThrownBy(() -> CalibrationMeasures.of( "Test", TradeCalibrationMeasure.FRA_PAR_SPREAD, TradeCalibrationMeasure.FRA_PAR_SPREAD)); assertThatIllegalArgumentException() .isThrownBy(() -> CalibrationMeasures.of( "Test", ImmutableList.of(TradeCalibrationMeasure.FRA_PAR_SPREAD, TradeCalibrationMeasure.FRA_PAR_SPREAD))); }