Add Header Value For Spring TestRestTemplate Integration Test
<p>I am using <code>TestRestTemplate</code> for integration testing on our product.</p>

<p>I have one test that looks like this:</p>

<pre><code>@Test
public void testDeviceQuery() {
    ResponseEntity&lt;Page&gt; deviceInfoPage = template.getForEntity(base, Page.class);

    // validation code here
}
</code></pre>

<p>This particular request expects a Header value. Can someone please let me know how I can add a header to the <code>TestRestTemplate</code> call?</p>