### Question:
FluentDriverWait { public FluentWait await(FluentControl control) { FluentWait fluentWait = new FluentWait(control); configureWithAwaitAtMost(fluentWait); configureWithPollingEvery(fluentWait); return fluentWait; } FluentDriverWait(Configuration configuration); FluentWait await(FluentControl control);  }### Answer:
@Test public void shouldConfigureAtMost() { when(configuration.getAwaitAtMost()).thenReturn(2L); when(configuration.getAwaitPollingEvery()).thenReturn(null); Duration defaultSeleniumInterval = Duration.ofMillis(500L); FluentWait fluentWait = fluentDriverWait.await(fluentControl); assertThat(fluentWait.getWait()).hasFieldOrPropertyWithValue("timeout", Duration.ofMillis(2L)); assertThat(fluentWait.getWait()).hasFieldOrPropertyWithValue("interval", defaultSeleniumInterval); }
@Test public void shouldConfigurePollingEvery() { when(configuration.getAwaitAtMost()).thenReturn(null); when(configuration.getAwaitPollingEvery()).thenReturn(2L); Duration defaultSeleniumTimeout = Duration.ofSeconds(5L); FluentWait fluentWait = fluentDriverWait.await(fluentControl); assertThat(fluentWait.getWait()).hasFieldOrPropertyWithValue("timeout", defaultSeleniumTimeout); assertThat(fluentWait.getWait()).hasFieldOrPropertyWithValue("interval", Duration.ofMillis(2L)); }