Looks like this test actually does network access.  Unit tests should not perform network I/O - that would be an integration test.  Mocking out the network part using a mocking framework is the way to go.