            'sum' => [
                'script' => [
                    'source' => 'doc.price.value',
                ],
            ],
        ], $query->build());
    }

    public function test_it_fail_building_the_aggregation_without_field()
    {
        $query = new SumAggregation('sum_price');

        $this->expectException(QueryException::class);
