ConstantJerkTraversalSection implements TraversalSection { @Override public double getTotalDistance() { return distance; } ConstantJerkTraversalSection(
            double duration,
            double distance,
            double initialSpeed,
            double finalSpeed,
            double initialAcceleration,
            double finalAcceleration,
            double jerk); @Override double getDuration(); @Override double getTotalDistance(); @Override double getTimeAtDistance(@Nonnegative double distance); @Override double getDistanceAtTime(@Nonnegative double time); @Override double getSpeedAtTime(@Nonnegative double time); @Override double getAccelerationAtTime(@Nonnegative double time); @Override boolean isConstantAcceleration(); @Override boolean isAccelerating(); @Override boolean isDecelerating(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test @DisplayName("getTotalDistance() method") void testGetTotalDistance_returnsFullDistance() { assertThat(jerkUpAcceleratingSection.getTotalDistance()).isEqualTo(JERK_UP_DISTANCE); assertThat(jerkDownAcceleratingSection.getTotalDistance()).isEqualTo(JERK_DOWN_DISTANCE); assertThat(jerkUpDeceleratingSection.getTotalDistance()).isEqualTo(JERK_UP_DISTANCE); assertThat(jerkDownDeceleratingSection.getTotalDistance()).isEqualTo(JERK_DOWN_DISTANCE); }