### Question:
ConnectionKey implements Serializable { public String toString() { return providerId + ":" + providerUserId; } ConnectionKey(String providerId, String providerUserId); String getProviderId(); String getProviderUserId(); boolean equals(Object o); int hashCode(); String toString();  }### Answer:
@Test public void toString_providerIdAndProviderUserId() { ConnectionKey key = new ConnectionKey("provider1", "providerUser1"); assertEquals("provider1:providerUser1", key.toString()); }
@Test public void toString_providerIdOnly() { ConnectionKey key = new ConnectionKey("provider1", null); assertEquals("provider1:null", key.toString()); }