public async Task DateHistogramAggregation_Test()
        {
            var testProducts = TestData.GetTestProducts();
            var controller = new ElasticAggragationController();

            foreach (var item in testProducts)
            {
                IHttpActionResult result = await controller.DateHistogramAggregation(item);
                Assert.IsInstanceOfType(result, typeof (OkNegotiatedContentResult<ELSresult>));
                IHttpActionResult result2 = await controller.DateHistogramAggregation(null);
                Assert.IsInstanceOfType(result2, typeof (BadRequestErrorMessageResult));
            }
        }
        public async Task DashboardPieAggregation_Test()
        {
            var testProducts = TestData.GetTestProducts();
            var controller = new ElasticAggragationController();

            foreach (var item in testProducts)
            {
                var res = new Dictionary<int, IList<KeyItem>>();
                IHttpActionResult result = await controller.DashboardPieAggregation(item);
                Assert.IsInstanceOfType(result, typeof (OkNegotiatedContentResult<Dictionary<int, IList<KeyItem>>>));
                IHttpActionResult result2 = await controller.DashboardPieAggregation(null);
                Assert.IsInstanceOfType(result2, typeof (BadRequestErrorMessageResult));
            }
        }