### Question:
PageAssert extends AbstractAssert<PageAssert, FluentPage> implements PageStateAssert { @Override public PageAssert hasUrl(String url) { String pageUrl = actual.getDriver().getCurrentUrl(); if (!pageUrl.equals(url)) { failWithMessage("Current page url is " + pageUrl + ". Expected " + url); } return this; } PageAssert(FluentPage actual); @Override PageAssert hasElement(FluentWebElement element); @Override PageAssert hasElements(FluentList<? extends FluentWebElement> fluentList); @Override PageAssert hasElementDisplayed(FluentWebElement element); @Override PageAssert hasTitle(String title); @Override PageAssert hasUrl(String url); @Override PageAssert hasPageSourceContaining(String value); @Override PageAssert hasExpectedUrl(); @Override PageAssert hasExpectedElements(); @Deprecated @Override PageAssert isAt();  }### Answer:
@Test public void hasUrlOk() { String url = "https: doReturn(url).when(driver).getCurrentUrl(); pageAssert.hasUrl(url); }
@Test public void hasUrlKo() { doReturn("https: assertThatAssertionErrorIsThrownBy(() -> pageAssert.hasUrl("https: .hasMessage("Current page url is https: }