### Question:
WaitHook extends BaseFluentHook<WaitHookOptions> { @Override public List<WebElement> findElements() { return buildAwait().until(new Function<FluentControl, List<WebElement>>() { @Override public List<WebElement> apply(FluentControl input) { List<WebElement> elements = WaitHook.super.findElements(); if (elements.size() == 0) { return null; } return elements; } @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 testElementListNotFound() { assertThatThrownBy(() -> waitHook.findElements()).isExactlyInstanceOf(TimeoutException.class); }
@Test public void testElementListFound() { WebElement element1 = mock(WebElement.class); WebElement element2 = mock(WebElement.class); WebElement element3 = mock(WebElement.class); when(locator.findElements()).thenReturn(Arrays.asList(element1, element2, element3)); List<WebElement> found = waitHook.findElements(); assertThat(found).containsExactly(element1, element2, element3); }