@Test public void testHashCode() { IntegrationBridgeServiceInfo service = new IntegrationBridgeServiceInfo(NEW_VERSION, SERVICE_URL); service.setCurrentVersion(NEW_VERSION); int expected = service.getConnectivity().hashCode(); expected = 31 * expected + service.getCurrentVersion().hashCode(); expected = 31 * expected + service.getMinVersion().hashCode(); assertEquals(expected, service.hashCode()); }
@Override public int hashCode() { int result = connectivity != null ? connectivity.hashCode() : 0; result = 31 * result + (currentVersion != null ? currentVersion.hashCode() : 0); result = 31 * result + (minVersion != null ? minVersion.hashCode() : 0); return result; }
IntegrationBridgeServiceInfo { @Override public int hashCode() { int result = connectivity != null ? connectivity.hashCode() : 0; result = 31 * result + (currentVersion != null ? currentVersion.hashCode() : 0); result = 31 * result + (minVersion != null ? minVersion.hashCode() : 0); return result; } }
IntegrationBridgeServiceInfo { @Override public int hashCode() { int result = connectivity != null ? connectivity.hashCode() : 0; result = 31 * result + (currentVersion != null ? currentVersion.hashCode() : 0); result = 31 * result + (minVersion != null ? minVersion.hashCode() : 0); return result; } IntegrationBridgeServiceInfo(String minVersion, String url); }
IntegrationBridgeServiceInfo { @Override public int hashCode() { int result = connectivity != null ? connectivity.hashCode() : 0; result = 31 * result + (currentVersion != null ? currentVersion.hashCode() : 0); result = 31 * result + (minVersion != null ? minVersion.hashCode() : 0); return result; } IntegrationBridgeServiceInfo(String minVersion, String url); String getConnectivity(); void setConnectivity(Status connectivity); String getCurrentVersion(); void setCurrentVersion(String currentVersion); String getMinVersion(); Compability getCompatibility(); String getUrl(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
IntegrationBridgeServiceInfo { @Override public int hashCode() { int result = connectivity != null ? connectivity.hashCode() : 0; result = 31 * result + (currentVersion != null ? currentVersion.hashCode() : 0); result = 31 * result + (minVersion != null ? minVersion.hashCode() : 0); return result; } IntegrationBridgeServiceInfo(String minVersion, String url); String getConnectivity(); void setConnectivity(Status connectivity); String getCurrentVersion(); void setCurrentVersion(String currentVersion); String getMinVersion(); Compability getCompatibility(); String getUrl(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }