/** * Test the <code>write(b)</code> method. * @throws Exception */ @Test public void testRead() throws Exception { try (ClosedOutputStream cos = new ClosedOutputStream()) { cos.write('x'); fail("write(b)"); } catch (final IOException e) { // expected } }