Spring Boot test REST Controller - How to debug the TestRestTemplate exchange call?
<p>I am writing a test for controller endpoint and when I execute I always get a null value. Is there any way when I call a test method to debug to check if my call is reaching endpoint or not?</p>

<p>e.g.
My test</p>

<pre><code>@ActiveProfiles("local")
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = { Application.class })
@WebIntegrationTest("server.port:0")
@Slf4j
public class XYZControllerTest{
.
.
.
@Test
public void testEndpointXYZ(){
        ...
        Message createdMessage = testRestTemplate.exchange(postRequest, Message.class).getBody();


}

}
</code></pre>

<p>Above call always return null.</p>

<p>Please suggest a way to debug so that I can make sure I am reaching the endpoint in controller.</p>