Adjust tests to the new Segment class