### Question:
FluentListAssert extends AbstractFluentAssert<FluentListAssert, FluentList> implements ListStateAssert, ListAttributeAssert { @Override public FluentListAssert hasClasses(String... classesToFind) { return validateHasClasses("No selected element have classes: ", classesToFind); } 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 shouldHaveClasses() { when(fluentList.attributes("class")).thenReturn(Lists.newArrayList("class1 class2", "class1 class2 class3", "class4")); listAssert.hasClasses("class1", "class2"); }
@Test public void shouldFailHasClassesWhenNoElementHasClass() { when(fluentList.attributes("class")).thenReturn(Lists.newArrayList("class1 class2", "class1 class2 class3", "class4")); assertThatAssertionErrorIsThrownBy(() -> listAssert.hasClasses("class2", "class4")) .hasMessage("No selected element have classes: class2, class4. " + "Actual classes found : class1 class2, class1 class2 class3, class4"); }