assertThat(facet.entries().get(1).totalCount(), equalTo(1l));
assertThat(facet.entries().get(1).min(), closeTo(500d, 0.00001d));
assertThat(facet.entries().get(1).max(), closeTo(500d, 0.00001d));
assertThat(facet.entries().get(1).total(), closeTo(500d, 0.00001d));
facet = searchResponse.facets().facet("stats2");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("xxx"));
assertThat(facet.entries().get(0).count(), equalTo(2l));
assertThat(facet.entries().get(0).min(), closeTo(1d, 0.00001d));
assertThat(facet.entries().get(0).max(), closeTo(3d, 0.00001d));