### Question:
CappedBufferHttpEntity extends HttpEntityWrapper { @Override public boolean isStreaming() { return wrappedEntity.isStreaming(); } CappedBufferHttpEntity( final HttpEntity entity, int bufferSize );  CappedBufferHttpEntity( final HttpEntity entity ); @Override boolean isRepeatable(); @Override boolean isStreaming(); @Override boolean isChunked(); @Override long getContentLength(); @Override InputStream getContent(); @Override void writeTo( final OutputStream stream ); @SuppressWarnings("deprecation") @Override void consumeContent(); static final int DEFAULT_BUFFER_SIZE; }### Answer:
@Test public void testIsStreaming() throws Exception { String input = "0123456789"; BasicHttpEntity basic; InputStreamEntity streaming; CappedBufferHttpEntity replay; basic = new BasicHttpEntity(); basic.setContent( new ByteArrayInputStream( input.getBytes( StandardCharsets.UTF_8 ) ) ); replay = new CappedBufferHttpEntity( basic, 5 ); assertThat( replay.isStreaming(), is( true ) ); basic = new BasicHttpEntity(); basic.setContent( null ); replay = new CappedBufferHttpEntity( basic, 5 ); assertThat( replay.isStreaming(), is( false ) ); streaming = new InputStreamEntity( new ByteArrayInputStream( input.getBytes( StandardCharsets.UTF_8 ) ), 10, ContentType.TEXT_PLAIN ); replay = new CappedBufferHttpEntity( streaming, 5 ); assertThat( replay.isStreaming(), is( true ) ); }