@Test public void getProxyInfoNonMatchingProtocol() { when(this.proxyInfo.getType()).thenReturn("FOO"); assertNull(this.proxyInfoProvider.getProxyInfo("bar")); }
@Override public ProxyInfo getProxyInfo(String protocol) { if ((protocol == null) || (this.proxyInfo == null) || protocol.equalsIgnoreCase(this.proxyInfo.getType())) { return this.proxyInfo; } else { return null; } }
NullProtectingProxyInfoProvider implements ProxyInfoProvider { @Override public ProxyInfo getProxyInfo(String protocol) { if ((protocol == null) || (this.proxyInfo == null) || protocol.equalsIgnoreCase(this.proxyInfo.getType())) { return this.proxyInfo; } else { return null; } } }
NullProtectingProxyInfoProvider implements ProxyInfoProvider { @Override public ProxyInfo getProxyInfo(String protocol) { if ((protocol == null) || (this.proxyInfo == null) || protocol.equalsIgnoreCase(this.proxyInfo.getType())) { return this.proxyInfo; } else { return null; } } NullProtectingProxyInfoProvider(ProxyInfo proxyInfo); }
NullProtectingProxyInfoProvider implements ProxyInfoProvider { @Override public ProxyInfo getProxyInfo(String protocol) { if ((protocol == null) || (this.proxyInfo == null) || protocol.equalsIgnoreCase(this.proxyInfo.getType())) { return this.proxyInfo; } else { return null; } } NullProtectingProxyInfoProvider(ProxyInfo proxyInfo); @Override ProxyInfo getProxyInfo(String protocol); }
NullProtectingProxyInfoProvider implements ProxyInfoProvider { @Override public ProxyInfo getProxyInfo(String protocol) { if ((protocol == null) || (this.proxyInfo == null) || protocol.equalsIgnoreCase(this.proxyInfo.getType())) { return this.proxyInfo; } else { return null; } } NullProtectingProxyInfoProvider(ProxyInfo proxyInfo); @Override ProxyInfo getProxyInfo(String protocol);  }