Write test for dynamic port