### Question:
UncloseableInputStream extends InputStream { @Override public synchronized void mark(int readlimit) { myWrappedStream.mark(readlimit); } UncloseableInputStream(@NonNull InputStream wrappedStream); @Override int available(); InputStream getWrappedStream(); @Override synchronized void mark(int readlimit); @Override boolean markSupported(); @Override int read(); @Override int read(byte[] b); @Override int read(byte[] b, int off, int len); @Override synchronized void reset(); @Override long skip(long n);  }### Answer:
@Test public void testMark() throws IOException { final boolean[] called = new boolean[1]; InputStream wrapped = new ByteArrayInputStream(new byte[0]) { @Override public void mark(int readAheadLimit) { called[0] = true; super.mark(readAheadLimit); } }; new UncloseableInputStream(wrapped).mark(0); Assert.assertTrue(called[0]); }