Adding tests and change for more than one endpoint with repeated port and path.