Montgomery test