@Test
public void publishesMethodInvokerFilterWithFactoryAndOverridesPerRequestMethodInvokerFilterThroughEverrestApplication() {

    EverrestApplication application = mock(EverrestApplication.class);
    ObjectFactory methodInvokerFilterFactory = mockObjectFactory(AllMatchesMethodInvokerFilter.class);
    when(application.getClasses()).thenReturn(newHashSet(AllMatchesMethodInvokerFilter.class));
    when(application.getFactories()).thenReturn(newHashSet(methodInvokerFilterFactory));
    publisher.publish(application);
    verify(providers, never()).addMethodInvokerFilter(AllMatchesMethodInvokerFilter.class);
    verify(providers).addMethodInvokerFilter(methodInvokerFilterFactory);
}