@Test public void readTestBytesOffLength() throws IOException { final byte[] bytes = { 'a', 'b' }; final int offset = 2339; final int length = 23; final int readValue = 23324; context.checking(new Expectations() { { one(inputStreamMock).read(bytes, offset, length); will(returnValue(readValue)); } }); assertEquals(readValue, sut.read(bytes, offset, length)); context.assertIsSatisfied(); }
@Override public int read() throws IOException { return inputStream.read(); }
ResourceInputStream extends InputStream { @Override public int read() throws IOException { return inputStream.read(); } }
ResourceInputStream extends InputStream { @Override public int read() throws IOException { return inputStream.read(); } protected  ResourceInputStream(final InputStream theInputStream);  ResourceInputStream(final String theResourceName); }
ResourceInputStream extends InputStream { @Override public int read() throws IOException { return inputStream.read(); } 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 read() throws IOException { return inputStream.read(); } 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);  }