Refactor tests

Refactor tests to use common search methods