// -------------------------------------------------------------------------
 public void test_toTrade_tenor() {
   ThreeLegBasisSwapConvention base =
       ImmutableThreeLegBasisSwapConvention.of(NAME, FIXED, IBOR6M, IBOR12M);
   LocalDate tradeDate = LocalDate.of(2015, 5, 5);
   LocalDate startDate = date(2015, 5, 7);
   LocalDate endDate = date(2025, 5, 7);
   SwapTrade test = base.createTrade(tradeDate, TENOR_10Y, BUY, NOTIONAL_2M, 0.25d, REF_DATA);
   Swap expected =
       Swap.of(
           FIXED.toLeg(startDate, endDate, PAY, NOTIONAL_2M, 0.25d),
           IBOR6M.toLeg(startDate, endDate, PAY, NOTIONAL_2M),
           IBOR12M.toLeg(startDate, endDate, RECEIVE, NOTIONAL_2M));
   assertEquals(test.getInfo().getTradeDate(), Optional.of(tradeDate));
   assertEquals(test.getProduct(), expected);
 }
 @Override
 public DatedCurveParameterMetadata metadata(LocalDate valuationDate) {
   SwapTrade trade = template.toTrade(valuationDate, BuySell.BUY, 1, 1, 0);
   return TenorCurveNodeMetadata.of(trade.getProduct().getEndDate(), template.getTenor(), label);
 }