@Test
public void testWrite() throws IOException {

  final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
  final HexOutputStream hexOut = new HexOutputStream(byteOut);
  hexOut.write('A');
  assertEquals('A', Integer.parseInt(new String(byteOut.toByteArray()), 16));
}