### Question:
FluentListAssert extends AbstractFluentAssert<FluentListAssert, FluentList> implements ListStateAssert, ListAttributeAssert { @Override public FluentListAssert hasDimension(Dimension dimension) { List<Dimension> actualDimensions = requiresNonEmpty(actual.dimensions()); if (!actualDimensions.contains(dimension)) { failWithMessage("No selected elements have dimension: " + dimension.toString() + ". Actual dimensions found : " + actualDimensions.toString()); } return this; } FluentListAssert(FluentList<? extends FluentWebElement> actual); @Override FluentListAssert isEmpty(); @Override FluentListAssert isNotEmpty(); @Override FluentListAssert hasSize(int expectedSize); @Override FluentListSizeBuilder hasSize(); @Override FluentListAssert hasText(String textToFind); @Override FluentListAssert hasTextContaining(String textToFind); @Override FluentListAssert hasTextMatching(String regexToBeMatched); @Override FluentListAssert hasNotText(String textToFind); @Override FluentListAssert hasNotTextContaining(String textToFind); @Override FluentListAssert hasId(String idToFind); @Override FluentListAssert hasClass(String classToFind); @Override FluentListAssert hasClasses(String... classesToFind); @Override FluentListAssert hasNotClass(String htmlClass); @Override FluentListAssert hasNotClasses(String... htmlClasses); @Override FluentListAssert hasValue(String value); @Override FluentListAssert hasName(String name); @Override FluentListAssert hasTagName(String tagName); @Override FluentListAssert hasDimension(Dimension dimension); @Override FluentListAssert hasAttributeValue(String attribute, String value); @Override ListAssert<String> hasAttribute(String attribute); @Override FluentListAssert hasNotAttribute(String attribute);  }### Answer:
@Test public void testHasDimensionOk() { Dimension dimensionOne = new Dimension(1, 2); Dimension dimensionTwo = new Dimension(3, 4); when(fluentList.dimensions()).thenReturn(Lists.newArrayList(dimensionOne, dimensionTwo)); listAssert.hasDimension(new Dimension(1, 2)); }
@Test public void testHasDimensionKo() { Dimension dimensionOne = new Dimension(1, 2); Dimension dimensionTwo = new Dimension(3, 4); when(fluentList.dimensions()).thenReturn(Lists.newArrayList(dimensionOne, dimensionTwo)); assertThatAssertionErrorIsThrownBy(() -> listAssert.hasDimension(new Dimension(5, 6))) .hasMessage("No selected elements have dimension: (5, 6). Actual dimensions found : [(1, 2), (3, 4)]"); }