WebDriverGenerator { public String getWindowHandles() { return driverObject + ".getWindowHandles()"; } 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 checkWindowHandlesReturnsCorrectCode() { assertThat(driver.getWindowHandles(), is(equalTo("driver.getWindowHandles()"))); }