### Question:
LimitedInputStream extends InputStream { @Override public void close() throws IOException { in.close(); } LimitedInputStream(final InputStream in, final long limit); @Override int read(); @Override int read(final byte[] b); @Override int read(byte[] b, int off, int len); @Override long skip(final long n); @Override int available(); @Override void close(); @Override void mark(int readlimit); @Override boolean markSupported(); @Override void reset();  }### Answer:
@Test public void testClose() { final LimitedInputStream lis = new LimitedInputStream(bais, 4); try { lis.close(); } catch (IOException e) { fail(); } }