@Test
public void testWriteDouble() {

	Serializer serializer = new Serializer();
	ByteBuffer byteBuffer = ByteBuffer.allocate(_COUNT * 8);
	byteBuffer.order(ByteOrder.BIG_ENDIAN);
	DoubleBuffer doubleBuffer = byteBuffer.asDoubleBuffer();
	double[] doubles = new double[_COUNT];
	for (int i = 0; i < _COUNT; i++) {
		doubles[i] = _random.nextDouble();
		serializer.writeDouble(doubles[i]);
		doubleBuffer.put(doubles[i]);
	}
	ByteBuffer serializerByteBuffer = serializer.toByteBuffer();
	Assert.assertArrayEquals(
		byteBuffer.array(), serializerByteBuffer.array());
}