From 549b1c85c38256d53a1f7d6da47eb7b80f514baf Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Thu, 12 Dec 2019 05:42:48 -0500 Subject: [PATCH] Test fix --- .../interceptor/AdditionalHeadersInterceptorTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/interceptor/AdditionalHeadersInterceptorTest.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/interceptor/AdditionalHeadersInterceptorTest.java index 02cc3d8fa65..829261f870f 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/interceptor/AdditionalHeadersInterceptorTest.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/client/interceptor/AdditionalHeadersInterceptorTest.java @@ -28,6 +28,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; @@ -98,9 +99,9 @@ public class AdditionalHeadersInterceptorTest { HttpGet get = (HttpGet) capt.getValue(); assertEquals("http://foo/Patient", get.getURI().toString()); - assertThat(Arrays.asList(get.getHeaders("X-0")), Matchers.contains("X-0-VAL")); - assertThat(Arrays.asList(get.getHeaders("X-1")), Matchers.contains("X-1-VAL")); - assertThat(Arrays.asList(get.getHeaders("X-2")), Matchers.contains("X-2-VAL1", "X-2-VAL2")); + assertThat(Arrays.stream(get.getHeaders("X-0")).map(Object::toString).collect(Collectors.toList()), Matchers.contains("X-0: X-0-VAL")); + assertThat(Arrays.stream(get.getHeaders("X-1")).map(Object::toString).collect(Collectors.toList()), Matchers.contains("X-1: X-1-VAL")); + assertThat(Arrays.stream(get.getHeaders("X-2")).map(Object::toString).collect(Collectors.toList()), Matchers.contains("X-2: X-2-VAL1", "X-2: X-2-VAL2")); } private String createBundle() {