private void setupProxyConfig()
throws IOException
{
final GlobalConfigurationResource resource = SettingsMessageUtil.getCurrentSettings();
RemoteProxySettingsDTO proxy = resource.getRemoteProxySettings();
if (proxy == null) {
proxy = new RemoteProxySettingsDTO();
resource.setRemoteProxySettings(proxy);
}
proxy.setHttpProxySettings(new RemoteHttpProxySettingsDTO());
proxy.getHttpProxySettings().setProxyHostname("http://somejunkproxyurl");
proxy.getHttpProxySettings().setProxyPort(555);
proxy.getNonProxyHosts().clear();
proxy.addNonProxyHost("localhost");
final Status status = SettingsMessageUtil.save(resource);
assertThat(status.isSuccess(), is(true));
}