@Override
    public Long computeValue(final Collection<T> elementsInBin, final int totalElements) {
        return (long) elementsInBin.stream()
                .mapToLong(valueRetrievalFunction)
                .average()
                .orElse(0L);
    }
@Test
    void testReturnsAverage() {
        final Long result = toTest.computeValue(
                List.of(
                        QueryExecutionStats.builder().duration(10).build(),
                        QueryExecutionStats.builder().duration(20).build(),
                        QueryExecutionStats.builder().duration(60).build()
                ),
                42
        );
        assertEquals(30, result);
    }