@Test
public void publishesPerRequestMessageBodyWriter() {

    Application application = mock(Application.class);
    when(application.getClasses()).thenReturn(newHashSet(StringEntityProvider.class));
    publisher.publish(application);
    verify(providers).addMessageBodyWriter(StringEntityProvider.class);
}