@Test
public void should_fail_if_Component_is_not_enabled_before_timeout() {
disableButton();
int timeout = 1000;
StopWatch stopWatch = startNewStopWatch();
try {
driver.requireEnabled(window.button, timeout(timeout));
failWhenExpectingException();
} catch (WaitTimedOutError e) {
assertThat(e.getMessage()).contains("Timed out waiting for").contains(window.button.getClass().getName())
.contains("to be enabled");
}
stopWatch.stop();
assertThatWaited(stopWatch, timeout);
}