WebDriver.Options options = mock(WebDriver.Options.class);
WebDriver.Timeouts timeouts = mock(WebDriver.Timeouts.class);
when(wd.findElement(By.tagName("div"))).thenReturn(we);
when(we.getTagName()).thenReturn("div");
when(wd.manage()).thenReturn(options);
when(options.timeouts()).thenReturn(timeouts);
when(timeouts.implicitlyWait(10, TimeUnit.SECONDS)).thenReturn(timeouts);
Monitor monitor = new ExceptionCounter();
FluentWebDriver fwd = new FluentWebDriver(wd, monitor);