Making getSegmentInfoForTest() asynchronous