REFACTOR to add NPE and test if useSystemProxies works