Defined networking functions as weak to be able to mock them in tests