### Question:
OAuth2UserAgentUtils { static RequestEntity<?> withUserAgent(RequestEntity<?> request) { HttpHeaders headers = new HttpHeaders(); headers.putAll(request.getHeaders()); headers.add(HttpHeaders.USER_AGENT, DISCORD_BOT_USER_AGENT); return new RequestEntity<>(request.getBody(), headers, request.getMethod(), request.getUrl()); }    }### Answer:
@Test public void shouldAddHeaders() throws URISyntaxException { RequestEntity<?> requestEntity = new RequestEntity<>("body", new HttpHeaders(), HttpMethod.POST, new URI("https: RequestEntity<?> withUserAgent = OAuth2UserAgentUtils.withUserAgent(requestEntity); assertThat(withUserAgent).isNotNull(); assertThat(withUserAgent.getBody()).isSameAs(requestEntity.getBody()); assertThat(withUserAgent.getHeaders()).containsKey(HttpHeaders.USER_AGENT); assertThat(withUserAgent.getMethod()).isSameAs(requestEntity.getMethod()); assertThat(withUserAgent.getUrl()).isSameAs(requestEntity.getUrl()); }