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