added tests for json_api
update controllers