@Test
  public void testClosedInputStream_throwsException() throws IOException {
    JimfsInputStream in = newInputStream(1, 2, 3);
    in.close();

    try {
      in.read();
      fail();
    } catch (IOException expected) {
    }

    try {
      in.read(new byte[3]);
      fail();
    } catch (IOException expected) {
    }

    try {
      in.read(new byte[10], 0, 2);
      fail();
    } catch (IOException expected) {
    }

    try {
      in.skip(10);
      fail();
    } catch (IOException expected) {
    }

    try {
      in.available();
      fail();
    } catch (IOException expected) {
    }

    in.close(); // does nothing
  }
Tests for {@link JimfsInputStream}.

@author Colin Decker
jimfs/src/test/java/com/google/common/jimfs/JimfsInputStreamTest.java