AngularJS test for ElasticSearch