BS-10830, add integration test and fix default search order