### Question:
CappedBufferHttpEntity extends HttpEntityWrapper { @SuppressWarnings("deprecation") @Override public void consumeContent() throws IOException { throw new UnsupportedOperationException(); } 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 (expected = UnsupportedOperationException.class) public void testConsumeContent() throws Exception { String input = "0123456789"; BasicHttpEntity basic; CappedBufferHttpEntity replay; basic = new BasicHttpEntity(); basic.setContent( new ByteArrayInputStream( input.getBytes( StandardCharsets.UTF_8 ) ) ); replay = new CappedBufferHttpEntity( basic, 5 ); replay.consumeContent(); }