Extend Agent test and validate host and port arguments