Add a unit test for redirection