search history implementation with unit test