### Question:
AbstractDispatcherCacheHeaderFilter implements Filter { @Deactivate protected final void deactivate(ComponentContext context) { for(Iterator<ServiceRegistration> it = filterRegistrations.iterator(); it.hasNext(); ) { ServiceRegistration registration = it.next(); registration.unregister(); it.remove(); } }  @Override void init(final FilterConfig filterConfig); @Override final void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse,
            final FilterChain filterChain); @Override void destroy(); static final String PROP_FILTER_PATTERN; }### Answer:
@Test public void testDeactivate() throws Exception { filter.activate(componentContext); filter.deactivate(componentContext); filter.deactivate(componentContext); verify(serviceRegistration).unregister(); verifyNoMoreInteractions(serviceRegistration); }