NetworkUtilsTest: code tidy