@Test
public void testWrite() throws IOException {

  final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
  final LittleEndianDataOutputStream littleEndianOut = new LittleEndianDataOutputStream(byteOut);
  final byte[] expected = randomUUID().toString().getBytes();
  littleEndianOut.write(expected, 0, expected.length);
  littleEndianOut.close();
  assertTrue(Arrays.equals(expected, byteOut.toByteArray()));
}