Since Grails 4 it is not possible anymore to get the server port in grails integration tests this way:
@Value('${local.server.port}')
Integer serverPort
What's the correct way to get the server port in tests?
The serverPort is already injected in Grails 4 integration tests as serverPort
. There is no need to create a variable for it.