@Override
  public void write( int b ) throws IOException {
    write( new byte[] { (byte) b, } );
  }
@Test
  public void testWrite() throws IOException {
    WriterOutputStream stream = new WriterOutputStream( writer );
    stream.write( 68 );
    stream.write( "value".getBytes(), 1, 3 );
    stream.write( "value".getBytes() );
    stream.flush();
    stream.close();
    verify( writer ).append( new String( new byte[] { (byte) 68 } ) );
    verify( writer ).append( "alu" );
    verify( writer ).append( "value" );
    verify( writer ).flush();
    verify( writer ).close();
    assertNull( stream.getWriter() );

    writer = mock( Writer.class );
    WriterOutputStream streamWithEncoding = new WriterOutputStream( writer, encoding );
    streamWithEncoding.write( "value".getBytes( encoding ) );
    verify( writer ).append( "value" );
  }