It would be good to abstract "network" and "NetworkManager" to constant, as it can change in future and we should change it in one place. Something like MANAGED_SERVICE and CONTROLLED_SERVICE ( or whatever in target problem domain ).