### Question:
AttributeFilter implements SearchFilter { @Override public boolean isCssFilterSupported() { return matcher != null && matcher.isCssFilterSupported() && !"text".equalsIgnoreCase(getAttribute()) && !"textContent".equalsIgnoreCase(getAttribute()); } AttributeFilter(String attributeName, String value);  AttributeFilter(String customAttribute, AbstractMatcher matcher); String getAttribute(); AbstractMatcher getMatcher(); @Override String toString(); @Override String getCssFilter(); @Override boolean isCssFilterSupported(); @Override Collection<FluentWebElement> applyFilter(Collection<FluentWebElement> elements);  }### Answer:
@Test public void shouldSupportCssFilter() { AbstractMatcher matcher = new EqualMatcher(A_VALUE); AttributeFilter attributeFilter = new AttributeFilter("id", matcher); assertThat(attributeFilter.isCssFilterSupported()).isTrue(); }
@Test public void shouldNotSupportCssFilterWhenMatcherIsNull() { AbstractMatcher matcher = null; AttributeFilter attributeFilter = new AttributeFilter("id", matcher); assertThat(attributeFilter.isCssFilterSupported()).isFalse(); }
@Test public void shouldNotSupportCssFilterWhenCssFilterIsNotSupportedInMatcher() { AbstractMatcher matcher = new EqualMatcher(Pattern.compile(A_REGEX_VALUE)); AttributeFilter attributeFilter = new AttributeFilter("id", matcher); assertThat(attributeFilter.isCssFilterSupported()).isFalse(); }
@Test public void shouldNotSupportCssFilterWhenAttributeIsText() { AbstractMatcher matcher = new EqualMatcher(Pattern.compile(A_REGEX_VALUE)); AttributeFilter attributeFilter = new AttributeFilter("text", matcher); assertThat(attributeFilter.isCssFilterSupported()).isFalse(); }
@Test public void shouldNotSupportCssFilterWhenAttributeIsTextContent() { AbstractMatcher matcher = new EqualMatcher(Pattern.compile(A_REGEX_VALUE)); AttributeFilter attributeFilter = new AttributeFilter("textContent", matcher); assertThat(attributeFilter.isCssFilterSupported()).isFalse(); }