WebDriverGenerator { public Navigation navigate() { return new Navigation(); } WebDriverGenerator(String value); String get(String value); String close(); String getCurrentUrl(); String getTitle(); String getPageSource(); String getWindowHandles(); String getWindowHandle(); WebElementGenerator findElement(String value); WebElementListGenerator findElements(String value); Options manage(); TargetLocator switchTo(); Navigation navigate();  }
@Test public void checkNavigateBackReturnsCorrectCode() { assertThat(driver.navigate().back(), is(equalTo("driver.navigate().back()"))); }
@Test public void checkNavigateForwardReturnsCorrectCode() { assertThat(driver.navigate().forward(), is(equalTo("driver.navigate().forward()"))); }
@Test public void checkNavigateToReturnsCorrectCode() { assertThat(driver.navigate().to("http: }
@Test public void checkNavigateRefreshReturnsCorrectCode() { assertThat(driver.navigate().refresh(), is(equalTo("driver.navigate().refresh()"))); }