Modified unit test to fake HTTPConnection