WrappedInputReader extends FilterReader { public int getContentLength() { return contentLength; } protected  WrappedInputReader(Reader in); int getContentLength(); @Override int read(); @Override int read(char[] cbuf, int off, int len); @Override long skip(long n); @Override void mark(int readAheadLimit); @Override void reset();  }
@Test public void unreadInputGivesMinusOne() throws Exception { WrappedInputReader reader = wrap(MESSAGE); assertThat(reader.getContentLength(), is(equalTo(-1))); }