### Question:
AvgFunction extends AggregateFunction<JsonNode, Double> { @Override public Double compute() { return sum / count; }  @Override AggregateFunction addValue(JsonNode value); @Override Double compute(); @Override AggregateFunction<JsonNode, Double> merge(AggregateFunction<JsonNode, Double> newValue);  }### Answer:
@Test public void shouldReturnNaNWhenNoValue() { AvgFunction avgFunction =new AvgFunction(); assertThat(avgFunction.compute()).isEqualTo(Double.NaN); }