### Question:
FluentWebElementAssert extends AbstractFluentAssert<FluentWebElementAssert, FluentWebElement> implements ElementStateAssert, ElementAttributeAssert { @Override public FluentWebElementAssert hasNotClasses(String... classesToFind) { String actualClasses = actual.attribute(CLASS_ATTRIBUTE); if (actualClasses != null) { List<String> actualClassesAsList = getClasses(actualClasses); if (actualClassesAsList.containsAll(Arrays.asList(classesToFind))) { failWithMessage("The element has the classes: " + Arrays.toString(classesToFind) + ". Actual classes found : " + actualClasses); } } return this; } FluentWebElementAssert(FluentWebElement actual); @Override FluentWebElementAssert isEnabled(); @Override FluentWebElementAssert isNotEnabled(); @Override FluentWebElementAssert isDisplayed(); @Override FluentWebElementAssert isNotDisplayed(); @Override FluentWebElementAssert isSelected(); @Override FluentWebElementAssert isNotSelected(); @Override FluentWebElementAssert isClickable(); @Override FluentWebElementAssert isNotClickable(); @Override FluentWebElementAssert isPresent(); @Override FluentWebElementAssert isNotPresent(); @Override FluentWebElementAssert hasText(String textToFind); @Override FluentWebElementAssert hasTextContaining(String text); @Override FluentWebElementAssert hasTextMatching(String regexToBeMatched); @Override FluentWebElementAssert hasNotText(String textToFind); @Override FluentWebElementAssert hasNotTextContaining(String textToFind); @Override FluentWebElementAssert hasId(String idToFind); @Override FluentWebElementAssert hasClass(String classToFind); @Override FluentWebElementAssert hasNotClass(String htmlClass); @Override FluentWebElementAssert hasClasses(String... classesToFind); @Override FluentWebElementAssert hasNotClasses(String... classesToFind); @Override FluentWebElementAssert hasValue(String value); @Override FluentWebElementAssert hasName(String name); @Override FluentWebElementAssert hasTagName(String tagName); @Override FluentWebElementAssert hasDimension(Dimension dimension); @Override FluentWebElementAssert hasAttributeValue(String attribute, String value); @Override AbstractStringAssert hasAttribute(String attribute); @Override FluentWebElementAssert hasNotAttribute(String attribute);  }### Answer:
@Test public void shouldNotHaveClasses() { when(element.attribute("class")).thenReturn("clazz clazz2 clazz3"); elementAssert.hasNotClasses("clazz2", "clazz4"); }
@Test public void shouldPassHasNotClassWhenNoClassAttributeIsPresent() { elementAssert.hasNotClasses("clazz2", "clazz4"); }
@Test public void shouldFailWhenContainsClasses() { when(element.attribute("class")).thenReturn("clazz clazz2 clazz3"); assertThatAssertionErrorIsThrownBy(() -> elementAssert.hasNotClasses("clazz2", "clazz3")) .hasMessage("The element has the classes: [clazz2, clazz3]. " + "Actual classes found : clazz clazz2 clazz3"); }