@Test
public void publishesSingletonMessageBodyWriter() {

    MessageBodyWriter<String> messageBodyWriter = new StringEntityProvider();
    Application application = mock(Application.class);
    when(application.getSingletons()).thenReturn(newHashSet(messageBodyWriter));
    publisher.publish(application);
    verify(providers).addMessageBodyWriter(messageBodyWriter);
}