Added Some unit test to handle redirects. Not complete yet