@Test
void accumulateValueTo_whenXWithinRange_thenReturnsExpectedValue() {

    double result = SegmentGraphUtilities.accumulateValueTo(sections, Section::xExtent, s -> s.y, Section::extrapolateValue, 7.7);
    assertThat(result).isCloseTo(9.4, within(1e-6));
}