@Test
  public void testClosedOutputStream_throwsException() throws IOException {
    JimfsOutputStream out = newOutputStream(false);
    out.close();

    try {
      out.write(1);
      fail();
    } catch (IOException expected) {
    }

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

    try {
      out.write(new byte[10], 1, 3);
      fail();
    } catch (IOException expected) {
    }

    out.close(); // does nothing
  }
Tests for {@link JimfsOutputStream}.

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