Add TestCase of getSegments