What happens if the uri doesn't match one of the patterns in YoutubeUriCanonicaliser? It looks as though videoIdFrom(uri) returns null, so what does canonicalUriFor() do then? I suspect it'll return http://gdata.youtube.com/feeds/api/videos/null, which is probably not the desired behaviour.