Added url expander tests and fixed incorrect request handling in the
plugin.