### Question:
PageAssert extends AbstractAssert<PageAssert, FluentPage> implements PageStateAssert { @Override public PageAssert hasExpectedElements() { By by = actual.getClassAnnotations().buildBy(); if (by == null) { failWithMessage("Page has not defined @FindBy class level annotation"); } actual.isAtUsingSelector(by); 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 testHasExpectedElements() { when(fluentPage.getClassAnnotations()).thenReturn(classAnnotations); By selector = By.cssSelector("selector"); when(classAnnotations.buildBy()).thenReturn(selector); pageAssert.hasExpectedElements(); verify(fluentPage).isAtUsingSelector(selector); }