recently I changed my spring boot properties to define a management port. In doing so, my unit tests started to fail :(
I wrote a unit test that tested the /
Had the same issue, you just have to make the management.port null by adding this in your application-test.properties (set it to empty value)
management.port=
Make sure you use the test profile in your JUnit by annotating the class with
@ActiveProfiles("test")