ConstantAccelerationTraversalSection implements TraversalSection, Serializable { @Override public double getTotalDistance() { return distance; } ConstantAccelerationTraversalSection(double distance, double acceleration, double initialSpeed, double finalSpeed, double time); @Override double getDuration(); @Override double getTotalDistance(); @Override double getDistanceAtTime(@Nonnegative double time); @Override double getTimeAtDistance(@Nonnegative double distance); @Override double getSpeedAtTime(@Nonnegative double time); @Override double getAccelerationAtDistance(@Nonnegative double distance); @Override double getAccelerationAtTime(@Nonnegative double time); @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(acceleratingTraversalSection.getTotalDistance()).isEqualTo(DISTANCE); assertThat(deceleratingTraversalSection.getTotalDistance()).isEqualTo(DISTANCE); }