ReportingFactory implements InputStreamFactory { @Override public long getExpectedSize() throws IOException { return factory.getExpectedSize(); } ReportingFactory(InputStreamFactory factory, ProgressReport report); @Override InputStream openStream(); @Override long getExpectedSize();  }
@Test public void reportsLengthFromWrappedFactory() throws Exception { assertThat(reportingFactory.getExpectedSize(),is(20L)); }