First stab at implementing nettest API with some minimal unittesting