Made search test more robust