### Question:
CurrencyPair implements Serializable { public static CurrencyPair of(Currency base, Currency counter) { ArgChecker.notNull(base, "base"); ArgChecker.notNull(counter, "counter"); return new CurrencyPair(base, counter); } private  CurrencyPair(Currency base, Currency counter); static Set<CurrencyPair> getAvailablePairs(); static CurrencyPair of(Currency base, Currency counter); @FromString static CurrencyPair parse(String pairStr); CurrencyPair inverse(); boolean contains(Currency currency); Currency other(Currency currency); boolean isIdentity(); boolean isInverse(CurrencyPair other); Optional<CurrencyPair> cross(CurrencyPair other); boolean isConventional(); CurrencyPair toConventional(); ImmutableSet<Currency> toSet(); int getRateDigits(); Currency getBase(); Currency getCounter(); @Override boolean equals(Object obj); @Override int hashCode(); @Override @ToString String toString();  }### Answer:
@Test public void test_of_CurrencyCurrency_null() { assertThatIllegalArgumentException().isThrownBy(() -> CurrencyPair.of(null, USD)); assertThatIllegalArgumentException().isThrownBy(() -> CurrencyPair.of(USD, null)); assertThatIllegalArgumentException().isThrownBy(() -> CurrencyPair.of(null, null)); }
@Test public void test_serialization() { assertSerialization(CurrencyPair.of(GBP, USD)); assertSerialization(CurrencyPair.of(GBP, GBP)); }
@Test public void test_jodaConvert() { assertJodaConvert(CurrencyPair.class, CurrencyPair.of(GBP, USD)); assertJodaConvert(CurrencyPair.class, CurrencyPair.of(GBP, GBP)); }