Allow redirects with 301 status code

When using the redirectTo method from a controller there is no option to change the http status code (it will always be 302).

Additionally to the two tests that now test the redirect functionality, I added another one testing the getHandler method.