port validation unit test