### Question:
SwapLegAmount implements LegAmount, ImmutableBean, Serializable { @Override public SwapLegAmount convertedTo(Currency resultCurrency, FxRateProvider rateProvider) { CurrencyAmount convertedAmount = amount.convertedTo(resultCurrency, rateProvider); return this.toBuilder().amount(convertedAmount).build(); } private  SwapLegAmount(
      CurrencyAmount amount,
      PayReceive payReceive,
      SwapLegType type,
      Currency currency); static SwapLegAmount of(ResolvedSwapLeg leg, CurrencyAmount amount); @Override SwapLegAmount convertedTo(Currency resultCurrency, FxRateProvider rateProvider); static SwapLegAmount.Meta meta(); static SwapLegAmount.Builder builder(); @Override SwapLegAmount.Meta metaBean(); @Override CurrencyAmount getAmount(); PayReceive getPayReceive(); SwapLegType getType(); Currency getCurrency(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void convertedTo() { SwapLegAmount legAmount = SwapLegAmount.builder() .amount(CurrencyAmount.of(Currency.GBP, 10)) .payReceive(PayReceive.PAY) .type(SwapLegType.FIXED) .currency(Currency.GBP) .build(); SwapLegAmount convertedAmount = legAmount.convertedTo(Currency.USD, FxRate.of(Currency.GBP, Currency.USD, 1.6)); assertThat(convertedAmount.getAmount().getCurrency()).isEqualTo(Currency.USD); assertThat(convertedAmount.getAmount().getAmount()).isEqualTo(16.0); assertThat(convertedAmount.getPayReceive()).isEqualTo(legAmount.getPayReceive()); assertThat(convertedAmount.getType()).isEqualTo(legAmount.getType()); assertThat(convertedAmount.getCurrency()).isEqualTo(legAmount.getCurrency()); }