@Test public void closeTest() throws IOException { context.checking(new Expectations() { { one(inputStreamMock).close(); } }); sut.close(); context.assertIsSatisfied(); }
@Override public void close() throws IOException { if (log.isInfoEnabled()) { log.info("Closing the InputStream out of the resource with path: " + resourceName); } inputStream.close(); }
ResourceInputStream extends InputStream { @Override public void close() throws IOException { if (log.isInfoEnabled()) { log.info("Closing the InputStream out of the resource with path: " + resourceName); } inputStream.close(); } }
ResourceInputStream extends InputStream { @Override public void close() throws IOException { if (log.isInfoEnabled()) { log.info("Closing the InputStream out of the resource with path: " + resourceName); } inputStream.close(); } protected  ResourceInputStream(final InputStream theInputStream);  ResourceInputStream(final String theResourceName); }
ResourceInputStream extends InputStream { @Override public void close() throws IOException { if (log.isInfoEnabled()) { log.info("Closing the InputStream out of the resource with path: " + resourceName); } inputStream.close(); } protected  ResourceInputStream(final InputStream theInputStream);  ResourceInputStream(final String theResourceName); @Override int read(); @Override int available(); @Override void close(); @Override synchronized void mark(final int readlimit); @Override boolean markSupported(); @Override int read(final byte[] b, final int off, final int len); @Override int read(final byte[] b); @Override synchronized void reset(); @Override long skip(final long n); }
ResourceInputStream extends InputStream { @Override public void close() throws IOException { if (log.isInfoEnabled()) { log.info("Closing the InputStream out of the resource with path: " + resourceName); } inputStream.close(); } protected  ResourceInputStream(final InputStream theInputStream);  ResourceInputStream(final String theResourceName); @Override int read(); @Override int available(); @Override void close(); @Override synchronized void mark(final int readlimit); @Override boolean markSupported(); @Override int read(final byte[] b, final int off, final int len); @Override int read(final byte[] b); @Override synchronized void reset(); @Override long skip(final long n);  }