/*		
 * (C) Copyright 2017 Boni Garcia (http://bonigarcia.github.io/)		
 *		
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *		
 */
package io.github.bonigarcia.wdm.test.proxy;

import static io.github.bonigarcia.wdm.WebDriverManager.chromedriver;
import static java.lang.invoke.MethodHandles.lookup;
import static org.junit.Assert.assertTrue;
import static org.mockserver.integration.ClientAndServer.startClientAndServer;
import static org.slf4j.LoggerFactory.getLogger;

import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;
import org.mockserver.integration.ClientAndServer;
//import org.mockserver.integration.ClientAndProxy;
import org.slf4j.Logger;

/**
 * Test for proxy with mock server.
 * 
 * @since 1.7.2
 */
@RunWith(MockitoJUnitRunner.class)
public class MockProxyTest {

    final Logger log = getLogger(lookup().lookupClass());

    private ClientAndServer proxy;
    private int proxyPort;

    @Before
    public void setup() throws IOException {
        chromedriver().clearDriverCache();
        proxy = startClientAndServer();
        proxyPort = proxy.getLocalPort();
        log.debug("Started mock proxy on port {}", proxyPort);
    }

    @After
    public void teardown() {
        log.debug("Stopping mock proxy on port {}", proxyPort);
        proxy.stop();
    }

    @Test
    public void testMockProx() throws MalformedURLException {
        chromedriver().proxy("localhost:" + proxyPort).proxyUser("")
                .proxyPass("")
                .driverRepositoryUrl(
                        new URL("https://chromedriver.storage.googleapis.com/"))
                .setup();
        File driver = new File(chromedriver().getDownloadedDriverPath());
        assertTrue(driver.exists());
    }

}
@@ -700,79 +700,8 @@
 %0D%0A%0D%0A
-import static io.github.bonigarcia.wdm.WebDriverManager.chromedriver;%0D%0A
 impo
@@ -750,16 +750,16 @@
 ookup;%0D%0A
+
 import s
@@ -1329,16 +1329,69 @@
 ger;%0D%0A%0D%0A
+import io.github.bonigarcia.wdm.WebDriverManager;%0D%0A%0D%0A
 /**%0D%0A * 
@@ -1709,52 +1709,8 @@
  %7B%0D%0A
-        chromedriver().clearDriverCache();%0D%0A
     
@@ -2083,16 +2083,33 @@
         
+WebDriverManager.
 chromedr
@@ -2150,22 +2150,8 @@
 ort)
-.proxyUser(%22%22)
 %0D%0A  
@@ -2164,16 +2164,30 @@
         
+.proxyUser(%22%22)
 .proxyPa
@@ -2338,24 +2338,24 @@
  .setup();%0D%0A
-
         File
@@ -2373,16 +2373,51 @@
 ew File(
+%0D%0A                WebDriverManager.
 chromedr

Remove call to clearDriverCache() in proxy test