@Test
public void publishesMessageBodyWriterWithFactoryAndOverridesPerRequestMessageBodyWriterThroughEverrestApplication() {

    EverrestApplication application = mock(EverrestApplication.class);
    ObjectFactory messageBodyWriterFactory = mockObjectFactory(StringEntityProvider.class);
    when(application.getClasses()).thenReturn(newHashSet(StringEntityProvider.class));
    when(application.getFactories()).thenReturn(newHashSet(messageBodyWriterFactory));
    publisher.publish(application);
    verify(providers, never()).addMessageBodyWriter(StringEntityProvider.class);
    verify(providers).addMessageBodyWriter(messageBodyWriterFactory);
}