@Test
public void testWriteFloat() throws IOException {

  final float value = 256f;
  final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
  final LittleEndianDataOutputStream littleEndianOut = new LittleEndianDataOutputStream(byteOut);
  littleEndianOut.writeFloat(value);
  littleEndianOut.close();
  final byte[] expected =
      ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putFloat(value).array();
  assertTrue(Arrays.equals(expected, byteOut.toByteArray()));
}