how do pattern recognition tests work