Adding a spec for the segment generator class