You can use this:
driver.getPageSource().contains(pattern)
or find the element with the text and assert that it is visible.
WebElement el = driver.findElement(By.xpath("//*[contains(.,'" + pattern + "')]"));
I find that the latter works better in most cases. I wrap it in a try/catch block to grab any NoSuchElementException.