I should have said, UIAutomator doesn't give us any way to test this.
A hackish way is to get the coordinates of your text window and guess where the two links are so you can tap that location, but that will likely break on differently sized devices.