Assert.assertEquals("http.proxyHost was set", System.getProperty("http.proxyHost"), "localhost");
Assert.assertEquals("http.proxyPort was set", System.getProperty("http.proxyPort"), "8888");
Assert.assertEquals("http.nonProxyHosts was set", System.getProperty("http.nonProxyHosts"), "localhost,mymachine");
env.restore();
Assert.assertEquals("http.proxyHost was restored", System.getProperty("http.proxyHost"), proxyHost);
Assert.assertEquals("http.proxyPort was restored", System.getProperty("http.proxyPort"), proxyPort);
Assert.assertEquals("http.nonProxyHosts was restored", System.getProperty("http.nonProxyHosts"), nonProxyHosts);
}