### Question:
WaitHook extends BaseFluentHook<WaitHookOptions> { @Override public WebElement findElement() { return buildAwait().until(new Function<FluentControl, WebElement>() { @Override public WebElement apply(FluentControl input) { return WaitHook.super.findElement(); } @Override public String toString() { return WaitHook.super.toString(); } }); } WaitHook(FluentControl control, ComponentInstantiator instantiator, Supplier<WebElement> elementSupplier,
            Supplier<ElementLocator> locatorSupplier, Supplier<String> toStringSupplier, WaitHookOptions options); @Override void click(); @Override void sendKeys(CharSequence... keysToSend); @Override void submit(); @Override void clear(); @Override List<WebElement> findElements(); @Override WebElement findElement();  }### Answer:
@Test public void testElementNotFound() { assertThatThrownBy(() -> waitHook.findElement()).isExactlyInstanceOf(TimeoutException.class); }
@Test public void testElementFound() { WebElement childElement = mock(WebElement.class); when(locator.findElement()).thenReturn(childElement); WebElement found = waitHook.findElement(); assertThat(found).isSameAs(childElement); }