Quantization tests (TODO move)