public void testEmpty() throws IOException {
        final MappedFieldType ft = new NumberFieldMapper.NumberFieldType("field", NumberType.LONG);
        testCase(
            stats("_name").field(ft.name()),
            iw -> {},
            stats -> {
                assertEquals(0d, stats.getCount(), 0);
                assertEquals(0d, stats.getSum(), 0);
                assertEquals(Float.NaN, stats.getAvg(), 0);
                assertEquals(Double.POSITIVE_INFINITY, stats.getMin(), 0);
                assertEquals(Double.NEGATIVE_INFINITY, stats.getMax(), 0);
                assertFalse(AggregationInspectionHelper.hasValue(stats));
            },
            singleton(ft)
        );
    }
public void testEmpty() throws IOException {
        final MappedFieldType ft = new NumberFieldMapper.NumberFieldType("field", NumberType.LONG);
        testCase(
            stats("_name").field(ft.name()),
            iw -> {},
            stats -> {
                assertEquals(0d, stats.getCount(), 0);
                assertEquals(0d, stats.getSum(), 0);
                assertEquals(Float.NaN, stats.getAvg(), 0);
                assertEquals(Double.POSITIVE_INFINITY, stats.getMin(), 0);
                assertEquals(Double.NEGATIVE_INFINITY, stats.getMax(), 0);
                assertFalse(AggregationInspectionHelper.hasValue(stats));
            },
            singleton(ft)
        );
    }
public void testempty() throws ioexception { final mappedfieldtype ft = new numberfieldmapper.numberfieldtype("field", numbertype.long); testcase( stats("_name").field(ft.name()), iw -> {}, stats -> { assertequals(0d, stats.getcount(), 0); assertequals(0d, stats.getsum(), 0); assertequals(float.nan, stats.getavg(), 0); assertequals(double.positive_infinity, stats.getmin(), 0); assertequals(double.negative_infinity, stats.getmax(), 0); assertfalse(aggregationinspectionhelper.hasvalue(stats)); }, singleton(ft) ); }