### Question:
WebDriverRunner implements Runner { public void close() { setDefaultWindow(); if (browser.equals(WebBrowser.GoogleChrome)) { return; } driver.close(); }  Object getDriver(); void start(); void navigateTo(String url); void get(String url); String getCurrentUrl(); String getTitle(); Element getElement(String currentPageName, String elementName); @Override Element getElement(Class<?> elementClass); String getPageSource(); void close(); void quit(); Screen getScreen(); File saveScreenshot(); File saveScreenshotTo(String fileName); File saveScreenshotTo(String fileName, boolean generateSource); void setScreen(String screenName); static String MESSAGEBUNDLE; }### Answer:
@Test public void testClose() { WebDriver driverExpected = Mockito.mock(WebDriver.class); Mockito.when(driverExpected.getPageSource()).thenReturn("source"); WebDriverRunner runner = new WebDriverRunner(); runner.setWebDriver(driverExpected); }