Your Java OverviewPage class tells me that you want to use the PageObject model.
If you want to follow the example of Google ( https://code.google.com/p/selenium/wiki/PageObjects ), you can put all the fields and methods related to a particular page in PageObject, not TestClass.
For example, in your TestClass, instantiate the PageObject:
OverviewPage page = new OverViewPage(driver);
and in all your test packages, replace things like driver.get("http://www.google.com"); on driver.get(page.URL);
Basically what it comes down to is you shouldn't have anything in quotation marks in your TestClass. The advantage of this template is that when you have several tests related to the same field in PageObject, then when you need to update this field, you can do it easily in one place, rather than refactoring several lines of duplicated code during your tests.
In addition, for any given test, there should not be more than two lines - a method call and an assertion.
So, using the test search example (), you can move the following lines to a method inside the page object:
driver.findElement(searchBox).sendKeys(searchQuery); driver.findElement(submitSearch).click(); String search = driver.getPageSource(); boolean searchResults = search.contains(searchQuery); return searchResults;
And your test will look like this:
@Test public void searchResults(){ boolean searchResults = page.searchResults(); Assert.assertTrue(searchResults); }
This is my interpretation. Hope this helps!