@Test(expected = WrongPageError.class)
  public void
      the_pages_object_throws_a_wrong_page_error_when_the_page_object_doesnt_have_a_webdriver_constructor() {

    when(driver.getCurrentUrl()).thenReturn("http://www.google.com");
    final Pages pages = new Pages(driver, configuration);
    pages.currentPageAt(PageObjectWithNoDriverConstructor.class);
  }
  @Test(expected = WrongPageError.class)
  public void the_pages_object_throws_a_wrong_page_error_when_the_page_object_is_invalid() {

    when(driver.getCurrentUrl()).thenReturn("http://www.google.com");
    final Pages pages = new Pages(driver, configuration);
    pages.start();

    pages.currentPageAt(InvalidHomePage.class);
  }