@Test
public void retrievesMessageBodyWriterFromEmbeddedProviderBinderByTypeAndMediaTypeWhenRequiredMessageBodyWriterIsNotAvailableInApplicationProviderBinder() {

    MessageBodyWriter<String> stringMessageBodyWriter = mock(MessageBodyWriter.class);
    when(applicationProviders.getMessageBodyWriter(String.class, null, null, TEXT_PLAIN_TYPE)).thenReturn(stringMessageBodyWriter);
    assertSame(stringMessageBodyWriter, applicationProviders.getMessageBodyWriter(String.class, null, null, TEXT_PLAIN_TYPE));
}