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