This is how I do it in my code.
WebDriverWait wait = new WebDriverWait(webDriver, timeoutInSeconds);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id<locator>));
or
wait.until(ExpectedConditions.elementToBeClickable(By.id<locator>));
to be precise.
See also:
- org.openqa.selenium.support.ui.ExpectedConditions for similar shortcuts for various wait scenarios.
- org.openqa.selenium.support.ui.WebDriverWait for its various constructors.