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