Little refactoring changes in network test