added test case and refactor search controller.
added test case
added JSON data source