### Question:
Curves { public static CurveMetadata blackVolatilityByExpiry(String name, DayCount dayCount) { return blackVolatilityByExpiry(CurveName.of(name), dayCount); } private  Curves(); static CurveMetadata zeroRates(String name, DayCount dayCount); static CurveMetadata zeroRates(CurveName name, DayCount dayCount); static CurveMetadata zeroRates(
      CurveName name,
      DayCount dayCount,
      List<? extends ParameterMetadata> parameterMetadata); static CurveMetadata forwardRates(String name, DayCount dayCount); static CurveMetadata forwardRates(CurveName name, DayCount dayCount); static CurveMetadata forwardRates(
      CurveName name,
      DayCount dayCount,
      List<? extends ParameterMetadata> parameterMetadata); static CurveMetadata discountFactors(String name, DayCount dayCount); static CurveMetadata discountFactors(CurveName name, DayCount dayCount); static CurveMetadata discountFactors(
      CurveName name,
      DayCount dayCount,
      List<? extends ParameterMetadata> parameterMetadata); static CurveMetadata prices(String name); static CurveMetadata prices(CurveName name); static CurveMetadata prices(CurveName name, List<? extends ParameterMetadata> parameterMetadata); static CurveMetadata blackVolatilityByExpiry(String name, DayCount dayCount); static CurveMetadata blackVolatilityByExpiry(CurveName name, DayCount dayCount); static CurveMetadata blackVolatilityByExpiry(
      CurveName name,
      DayCount dayCount,
      List<? extends ParameterMetadata> parameterMetadata); static CurveMetadata normalVolatilityByExpiry(String name, DayCount dayCount); static CurveMetadata normalVolatilityByExpiry(CurveName name, DayCount dayCount); static CurveMetadata normalVolatilityByExpiry(
      CurveName name,
      DayCount dayCount,
      List<? extends ParameterMetadata> parameterMetadata); static CurveMetadata recoveryRates(String name, DayCount dayCount); static CurveMetadata recoveryRates(CurveName name, DayCount dayCount); static CurveMetadata recoveryRates(
      CurveName name,
      DayCount dayCount,
      List<? extends ParameterMetadata> parameterMetadata); static CurveMetadata sabrParameterByExpiry(
      String name,
      DayCount dayCount,
      ValueType yType); static CurveMetadata sabrParameterByExpiry(
      CurveName name,
      DayCount dayCount,
      ValueType yType); static CurveMetadata sabrParameterByExpiry(
      CurveName name,
      DayCount dayCount,
      ValueType yType,
      List<? extends ParameterMetadata> parameterMetadata);  }### Answer:
@Test public void blackVolatilityByExpiry_string() { CurveMetadata test = Curves.blackVolatilityByExpiry(NAME, ACT_360); CurveMetadata expected = DefaultCurveMetadata.builder() .curveName(CURVE_NAME) .xValueType(ValueType.YEAR_FRACTION) .yValueType(ValueType.BLACK_VOLATILITY) .dayCount(ACT_360) .build(); assertThat(test).isEqualTo(expected); }
@Test public void blackVolatilityByExpiry_curveName() { CurveMetadata test = Curves.blackVolatilityByExpiry(CURVE_NAME, ACT_360); CurveMetadata expected = DefaultCurveMetadata.builder() .curveName(CURVE_NAME) .xValueType(ValueType.YEAR_FRACTION) .yValueType(ValueType.BLACK_VOLATILITY) .dayCount(ACT_360) .build(); assertThat(test).isEqualTo(expected); }
@Test public void blackVolatilityByExpiry_curveNameParams() { CurveMetadata test = Curves.blackVolatilityByExpiry(CURVE_NAME, ACT_360, PARAMS); CurveMetadata expected = DefaultCurveMetadata.builder() .curveName(CURVE_NAME) .xValueType(ValueType.YEAR_FRACTION) .yValueType(ValueType.BLACK_VOLATILITY) .dayCount(ACT_360) .parameterMetadata(PARAMS) .build(); assertThat(test).isEqualTo(expected); }