### Question:
ComponentErrorHandlerImpl implements ComponentErrorHandler, Filter { protected final boolean accepts(final SlingHttpServletRequest request, final SlingHttpServletResponse response) { if (!StringUtils.endsWith(request.getRequestURI(), ".html") || !StringUtils.contains(response.getContentType(), "html")) { return false; } final ComponentContext componentContext = WCMUtils.getComponentContext(request); if (componentContext == null || componentContext.getComponent() == null || componentContext.isRoot()) { return false; } if (this.isComponentErrorHandlingSuppressed(request)) { return false; } final SlingHttpServletRequest slingRequest = (SlingHttpServletRequest) request; for (final String suppressedResourceType : suppressedResourceTypes) { if (slingRequest.getResource().isResourceType(suppressedResourceType)) { return false; } } return true; }  @Override void init(FilterConfig filterConfig); @Override final void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,
                               FilterChain chain); @Override final void destroy(); @Activate final void activate(final Map<String, String> config); @Override final void suppressComponentErrorHandling(final SlingHttpServletRequest request); @Override final void allowComponentErrorHandling(final SlingHttpServletRequest request); @Property(label = "Edit Error Handling",
            description = "Enable handling of Edit-mode errors (EDIT, DESIGN, ANALYTICS)",
            boolValue = DEFAULT_EDIT_ENABLED)
    static final String PROP_EDIT_ENABLED; @Property(label = "Edit HTML Error Path",
            description = "Path to html file in JCR use to display an erring component in EDIT or DESIGN modes.",
            value = DEFAULT_EDIT_ERROR_HTML_PATH)
    static final String PROP_EDIT_ERROR_HTML_PATH; @Property(label = "Preview Error Handling",
            description = "Enable handling of Edit-mode errors (PREVIEW and READ_ONLY)",
            boolValue = DEFAULT_PREVIEW_ENABLED)
    static final String PROP_PREVIEW_ENABLED; @Property(label = "Preview HTML Error Path",
            description = "Path to html file in JCR use to display an erring component in PREVIEW or READONLY modes.",
            value = DEFAULT_PREVIEW_ERROR_HTML_PATH)
    static final String PROP_PREVIEW_ERROR_HTML_PATH; @Property(label = "Publish Error Handling",
            description = "Enable handling of Edit-mode errors (PREVIEW and READONLY)",
            boolValue = DEFAULT_PUBLISH_ENABLED)
    static final String PROP_PUBLISH_ENABLED; @Property(label = "Publish HTML Error Path",
            description = "Path to html file in JCR use to display an erring component in DISABLED mode.",
            value = DEFAULT_PUBLISH_ERROR_HTML_PATH)
    static final String PROP_PUBLISH_ERROR_HTML_PATH; @Property(label = "Suppressed Resource Types",
            description = "Resource types this Filter will ignore during Sling Includes.",
            cardinality = Integer.MAX_VALUE,
            value = {})
    static final String PROP_SUPPRESSED_RESOURCE_TYPES; }### Answer:
@Test public void testAccepts_suppressAttribute() throws Exception { when(request.getAttribute(ComponentErrorHandler.SUPPRESS_ATTR)).thenReturn(true); final boolean result = handler.accepts(request, response); assertFalse(result); }