@Override
  public void close() throws IOException {
    throw new UnsupportedOperationException(
        "Caller does not own the underlying output stream " + " and should not call close().");
  }
@Test
  public void testClosingThrows() throws Exception {
    expectedException.expect(UnsupportedOperationException.class);
    expectedException.expectMessage("Caller does not own the underlying");
    os.close();
  }