@Test
public void publishesExceptionMapperWithFactoryAndOverridesPerRequestExceptionMapperThroughEverrestApplication() {

    EverrestApplication application = mock(EverrestApplication.class);
    ObjectFactory exceptionMapperFactory = mockObjectFactory(RuntimeExceptionMapper.class);
    when(application.getClasses()).thenReturn(newHashSet(RuntimeExceptionMapper.class));
    when(application.getFactories()).thenReturn(newHashSet(exceptionMapperFactory));
    publisher.publish(application);
    verify(providers, never()).addExceptionMapper(RuntimeExceptionMapper.class);
    verify(providers).addExceptionMapper(exceptionMapperFactory);
}