assertThat(configuration.getRemoteProxySettings().getNonProxyHosts(), hasItem("foo"));
}
@Test
public void existingSettings() {
final RemoteProxySettingsDTO configSettings = new RemoteProxySettingsDTO();
configSettings.setHttpProxySettings(new RemoteHttpProxySettingsDTO());
configSettings.getHttpProxySettings().setProxyHostname("foo");
configSettings.setHttpsProxySettings(new RemoteHttpProxySettingsDTO());
configSettings.getHttpsProxySettings().setProxyHostname("bar");
configSettings.addNonProxyHost("car1");
configuration.setRemoteProxySettings(configSettings);
final RemoteProxy underTest = createJerseyHttpProxy();
final RemoteProxySettingsDTO settings = underTest.settings();
assertThat(settings, is(notNullValue()));
assertThat(settings.getHttpProxySettings(), is(notNullValue()));
assertThat(settings.getHttpProxySettings().getProxyHostname(), is("foo"));
assertThat(settings.getHttpsProxySettings(), is(notNullValue()));
assertThat(settings.getHttpsProxySettings().getProxyHostname(), is("bar"));
assertThat(settings.getNonProxyHosts(), hasItem("car1"));
configSettings.getHttpProxySettings().setProxyHostname("foo1");
configSettings.getHttpsProxySettings().setProxyHostname("bar1");
configSettings.addNonProxyHost("car2");
underTest.save();