Added unit tests for the 307 redirect