ReaderEntityProvider implements EntityProvider<Reader> { @Override public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) { return Reader.class.isAssignableFrom(type); }  @Override boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType); @Override Reader readFrom(Class<Reader> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                           MultivaluedMap<String, String> httpHeaders, InputStream entityStream); @Override long getSize(Reader t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType); @Override boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType); @Override void writeTo(Reader reader, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                        MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream);  }
@Test public void isWritableForReader() throws Exception { assertTrue(readerEntityProvider.isWriteable(Reader.class, null, null, null)); }
@Test public void isNotWritableForTypeOtherThanReader() throws Exception { assertFalse(readerEntityProvider.isWriteable(Object.class, null, null, null)); }