### Question:
PageAssert extends AbstractAssert<PageAssert, FluentPage> implements PageStateAssert { @Override public PageAssert hasElements(FluentList<? extends FluentWebElement> fluentList) { if (fluentList.isEmpty()) { failWithMessage("No element selected by '" + fluentList.toString() + "' is present on the page."); } 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 hasElementsOk() { when(list.isEmpty()).thenReturn(false); pageAssert.hasElements(list); }
@Test public void hasElementsKo() { when(list.isEmpty()).thenReturn(true); assertThatAssertionErrorIsThrownBy(() -> pageAssert.hasElements(list)) .hasMessage("No element selected by 'list' is present on the page."); }