Junit testing for search function