modify unittest for previous commit and some fix

fix at NetworkGateway:
- add return code if resource_id does not exist in handle_delete()