### Question:
FxRate implements FxRateProvider, ImmutableBean, Serializable { public static FxRate of(Currency base, Currency counter, double rate) { return new FxRate(CurrencyPair.of(base, counter), rate); } private  FxRate(
      CurrencyPair pair,
      double rate); static FxRate of(Currency base, Currency counter, double rate); static FxRate of(CurrencyPair pair, double rate); static FxRate parse(String rateStr); FxRate inverse(); @Override double fxRate(Currency baseCurrency, Currency counterCurrency); FxRate crossRate(FxRate other); FxRate toConventional(); @Override String toString(); static FxRate.Meta meta(); @Override FxRate.Meta metaBean(); CurrencyPair getPair(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void test_of_CurrencyCurrencyDouble_invalid() { assertThatIllegalArgumentException().isThrownBy(() -> FxRate.of(GBP, USD, -1.5d)); assertThatIllegalArgumentException().isThrownBy(() -> FxRate.of(GBP, GBP, 2d)); }
@Test public void test_of_CurrencyCurrencyDouble_null() { assertThatIllegalArgumentException().isThrownBy(() -> FxRate.of(null, USD, 1.5d)); assertThatIllegalArgumentException().isThrownBy(() -> FxRate.of(USD, null, 1.5d)); assertThatIllegalArgumentException().isThrownBy(() -> FxRate.of(null, null, 1.5d)); }
@Test public void test_of_CurrencyPairDouble_invalid() { assertThatIllegalArgumentException().isThrownBy(() -> FxRate.of(CurrencyPair.of(GBP, USD), -1.5d)); assertThatIllegalArgumentException().isThrownBy(() -> FxRate.of(CurrencyPair.of(USD, USD), 2d)); }
@Test public void test_of_CurrencyPairDouble_null() { assertThatIllegalArgumentException().isThrownBy(() -> FxRate.of(null, 1.5d)); }
@Test public void test_convert() { FxRate test = FxRate.of(GBP, USD, 1.25d); assertThat(test.convert(100, GBP, USD)).isEqualTo(125d); assertThat(test.convert(100, USD, GBP)).isEqualTo(100d / 1.25d); assertThatIllegalArgumentException().isThrownBy(() -> test.convert(100, GBP, AUD)); }
@Test public void test_serialization() { assertSerialization(FxRate.of(GBP, USD, 1.25d)); assertSerialization(FxRate.of(GBP, GBP, 1d)); }
@Test public void coverage() { coverImmutableBean(FxRate.of(GBP, USD, 1.25d)); }