Update unit tests to not use external resources.

I also moved `_hasNetwork` to `Integration` since it should not be in unit tests.