S 68 rss wookiepedia

Agree. I will create unit test for it.

But, I don't want to test xpath quering (create mocks for DOM, etc.) - so, firstly, I am going to split this method into two:
1) extraction of textual content from links (by xpath quering) - result is just array of strings
2) iteration over array of strings, and applying described heuristics - to get title

So, the second method - is will be perfect for unit testing.
Although, if needed - I am willing to write unit tests for testing of xpath queries.