### Question:
IsClosedInputStream extends ProxyInputStream { public boolean isClosed() { return closed; } IsClosedInputStream(InputStream source); @Override void close(); boolean isClosed();  }### Answer:
@Test public void testIsClosed() throws IOException { byte[] data = new byte[10]; InputStream origIn = new ByteArrayInputStream(data); IsClosedInputStream in = new IsClosedInputStream(origIn); assertEquals(false, in.isClosed()); in.close(); assertEquals(true, in.isClosed()); }