### Question:
WebBase extends MappedElement implements BaseUI { public WebDriver getDriver() { return (WebDriver) getRunner().getDriver(); }  WebDriver getDriver(); void logStatistics(String msg); List<WebElement> getElements(); String getText(); void waitElement(Integer index); void waitElementOnlyVisible(Integer index); @SuppressWarnings("unchecked") void waitLoading(); void isVisibleDisabled(); void waitVisibleClickableEnabled(); Long getImplicitlyWaitTimeoutInMilliseconds(); List<String> getLocatorParameter(); void setLocatorParameters(List<String> locatorParameter2); JavascriptExecutor getJavascriptExecutor(); String getId(); void waitVisibleText(String text); void waitNotVisibleText(String text); void waitVisibleOrNotTextInElement(String text, boolean visible); void waitInvisible(); void waitInvisible(int index); void blur(); void waitText(String text); void waitNotText(String text); void waitTextNotInElement(String text); void waitTextInElement(String text); static ElementMap loadingMap; static boolean alreadySearchLoadingMap; }### Answer:
@Test @Ignore public void testVerifyState() { WebElement element = Mockito.mock(WebElement.class); Mockito.when(element.isDisplayed()).thenReturn(true); WebDriver driver = Mockito.mock(WebDriver.class); Mockito.when(driver.findElement((By) Mockito.anyObject())).thenReturn(element); Runner runner = Mockito.mock(Runner.class); Mockito.when(runner.getDriver()).thenReturn(driver); WebBase webBase = new WebBase(); ElementMap mapa = Mockito.mock(ElementMap.class); Mockito.when(mapa.locator()).thenReturn(new String[] { "ID" }); Mockito.when(mapa.locatorType()).thenReturn(ElementLocatorType.XPath); webBase.setRunner(runner); webBase.setElementMap(mapa); }
@Test public void testGetDriver() { WebElement element = Mockito.mock(WebElement.class); Mockito.when(element.isDisplayed()).thenReturn(true); WebDriver driver = Mockito.mock(WebDriver.class); Mockito.when(driver.findElement((By) Mockito.anyObject())).thenReturn(element); Runner runner = Mockito.mock(Runner.class); Mockito.when(runner.getDriver()).thenReturn(driver); WebBase webBase = new WebBase(); ElementMap mapa = Mockito.mock(ElementMap.class); Mockito.when(mapa.locator()).thenReturn(new String[] { "ID" }); Mockito.when(mapa.locatorType()).thenReturn(ElementLocatorType.XPath); webBase.setRunner(runner); webBase.setElementMap(mapa); WebDriver driverActual = webBase.getDriver(); Assert.assertEquals(driver, driverActual); }