Abstracting port string used in expected test result