@Test
public void retrievesMessageBodyWriterByTypeAndMediaType() {

    MessageBodyWriter<String> stringMessageBodyWriter = new StringEntityProvider();
    applicationProviders.addMessageBodyWriter(stringMessageBodyWriter);
    assertSame(stringMessageBodyWriter, applicationProviders.getMessageBodyWriter(String.class, null, null, TEXT_PLAIN_TYPE));
}