Add search code in tests