@Test public void availableTest() throws IOException { final int availableBytes = 3822; context.checking(new Expectations() { { one(inputStreamMock).available(); will(returnValue(availableBytes)); } }); int result = sut.available(); context.assertIsSatisfied(); assertEquals(availableBytes, result); }
@Override public int available() throws IOException { return inputStream.available(); }
ResourceInputStream extends InputStream { @Override public int available() throws IOException { return inputStream.available(); } }
ResourceInputStream extends InputStream { @Override public int available() throws IOException { return inputStream.available(); } protected  ResourceInputStream(final InputStream theInputStream);  ResourceInputStream(final String theResourceName); }
ResourceInputStream extends InputStream { @Override public int available() throws IOException { return inputStream.available(); } 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 int available() throws IOException { return inputStream.available(); } 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);  }