ReportingInputStream extends ProxyInputStream { @Override public synchronized long skip(final long length) throws IOException { final long skip = super.skip(length); report.progress(length); return skip; } ReportingInputStream(InputStream wrappedStream, ProgressReport report); @Override synchronized long skip(final long length);  }
@Test public void reportsSkip() throws Exception { stream.skip(5); verify(report).progress(5); }