@Test
public void testWriteShort() {

	Serializer serializer = new Serializer();
	ByteBuffer byteBuffer = ByteBuffer.allocate(_COUNT * 2);
	byteBuffer.order(ByteOrder.BIG_ENDIAN);
	ShortBuffer shortBuffer = byteBuffer.asShortBuffer();
	short[] shorts = new short[_COUNT];
	for (int i = 0; i < _COUNT; i++) {
		shorts[i] = (short)_random.nextInt();
		serializer.writeShort(shorts[i]);
		shortBuffer.put(shorts[i]);
	}
	ByteBuffer serializerByteBuffer = serializer.toByteBuffer();
	Assert.assertArrayEquals(
		byteBuffer.array(), serializerByteBuffer.array());
}