String expected = "Url: www.twitter.com <a href=\"http://www.twitter.com\">http://www.twitter.com</a>";
assertAutolink(expected, linker.autoLinkURLs(tweet));
}
public void testURLEntities() {
Entity entity = new Entity(0, 19, "http://t.co/0JG5Mcq", Entity.Type.URL);
entity.setDisplayURL("blog.twitter.com/2011/05/twitte…");
entity.setExpandedURL("http://blog.twitter.com/2011/05/twitter-for-mac-update.html");
List<Entity> entities = new ArrayList<Entity>();
entities.add(entity);
String tweet = "http://t.co/0JG5Mcq";
String expected = "<a href=\"http://t.co/0JG5Mcq\" rel=\"nofollow\"><span class='tco-ellipsis'><span style='position:absolute;left:-9999px;'> </span></span><span style='position:absolute;left:-9999px;'>http://</span><span class='js-display-url'>blog.twitter.com/2011/05/twitte</span><span style='position:absolute;left:-9999px;'>r-for-mac-update.html</span><span class='tco-ellipsis'><span style='position:absolute;left:-9999px;'> </span>…</span></a>";