|
|
@ -168,7 +168,7 @@ public class TestRestTemplateTests {
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void withBasicAuthReplacesBasicAuthInterceptorWhenAlreadyPresent() {
|
|
|
|
public void withBasicAuthReplacesBasicAuthInterceptorWhenAlreadyPresent() {
|
|
|
|
TestRestTemplate original = new TestRestTemplate("foo", "bar")
|
|
|
|
TestRestTemplate original = new TestRestTemplate("foo", "bar")
|
|
|
|
.withBasicAuth("replace", "repalce");
|
|
|
|
.withBasicAuth("replace", "replace");
|
|
|
|
TestRestTemplate basicAuth = original.withBasicAuth("user", "password");
|
|
|
|
TestRestTemplate basicAuth = original.withBasicAuth("user", "password");
|
|
|
|
assertThat(basicAuth.getRestTemplate().getMessageConverters())
|
|
|
|
assertThat(basicAuth.getRestTemplate().getMessageConverters())
|
|
|
|
.containsExactlyElementsOf(
|
|
|
|
.containsExactlyElementsOf(
|
|
|
|