COOPR-583: Added util method to get free port for test auth server.