### Question:
CurrencyPair { @Override public String toString() { return ccy1 + "." + ccy2; } CurrencyPair(final String ccy1, final String ccy2); static CurrencyPair of(final String ccy1, final String ccy2); String getCcy1(); String getCcy2(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); boolean containsCcy(final String ccy); Optional<String> findCommonCcy(final CurrencyPair otherPair); CurrencyPair createInverse();  }### Answer:
@Test public void testToString() throws Exception { final CurrencyPair cp = new CurrencyPair("A", "B"); assertThat(cp.toString()).isEqualTo("A.B"); }