ProxySettings { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ProxySettings settings = (ProxySettings) o; return getProxyPort() == settings.getProxyPort() && Objects.equals(getProxyHost(), settings.getProxyHost()); } private  ProxySettings(String proxyHost, int proxyPort); static ProxySettings noProxy(); static ProxySettings useProxy(String host, int port); static ProxySettings fromConfig(boolean useProxy, String host, int port); boolean isProxyUse(); String getProxyHost(); int getProxyPort(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final String UNDEFINED_HOST; static final int UNDEFINED_PORT; }
@Test public void testEquals() { EqualsVerifier.forClass(ProxySettings.class) .verify(); }