public void waitAndAssertForExpectedCondition(ExpectedCondition<?> condition, int timeout) {
        if (!waitForExpectedCondition(condition, timeout)) {
            fail(String.format("Element does not meet condition %1$s", condition.toString()));
        }
    }
public void waitAndAssertForExpectedCondition ( ExpectedCondition < ? > condition , int timeout ) { if ( ! waitForExpectedCondition ( condition , timeout ) ) { fail ( String . format ( "Element does not meet condition %1$s" , condition . toString ( ) ) ) ; } }
Waits until the expectations are met and throws an assert if not

@param condition The conditions the element should meet
@param timeout The timeout to wait