@Test
public void testWriteChar() {

	Serializer serializer = new Serializer();
	ByteBuffer byteBuffer = ByteBuffer.allocate(_COUNT * 2);
	byteBuffer.order(ByteOrder.BIG_ENDIAN);
	CharBuffer charBuffer = byteBuffer.asCharBuffer();
	char[] chars = new char[_COUNT];
	for (int i = 0; i < _COUNT; i++) {
		chars[i] = (char)_random.nextInt();
		serializer.writeChar(chars[i]);
		charBuffer.put(chars[i]);
	}
	ByteBuffer serializerByteBuffer = serializer.toByteBuffer();
	Assert.assertArrayEquals(
		byteBuffer.array(), serializerByteBuffer.array());
}