network test refactor