### Question:
PacFileEvaluator { String getProxies(final URI uri) { final String cachedResult = cache.getFromCache(uri); if (cachedResult != null) { return cachedResult; } final String result = getProxiesWithoutCaching(uri); LOG.debug("PAC result for url '{}' -> '{}'", uri, result); cache.addToCache(uri, result); return result; } PacFileEvaluator(final URL pacUrl, PacProxyCache cache);   }### Answer:
@Test public void testSimplePac() throws Exception { final URI uri = new URI("http: final PacFileEvaluator evaluator = new PacFileEvaluator(PacFileEvaluatorTest.class.getResource("simple-pac.js"), new NoopPacProxyCache()); final String proxy = evaluator.getProxies(uri); Assertions.assertNotNull(proxy); Assertions.assertEquals("PROXY proxy.example.com:8080; DIRECT", proxy); }
@Test public void testSimplePac2() throws Exception { final URI uri = new URI("http: final PacFileEvaluator evaluator = new PacFileEvaluator(PacFileEvaluatorTest.class.getResource("simple-pac.js"), new NoopPacProxyCache()); final String proxy = evaluator.getProxies(uri); Assertions.assertNotNull(proxy); Assertions.assertEquals("DIRECT", proxy); }