This commit is contained in:
jamesagnew 2019-12-12 05:42:48 -05:00
parent 344e5f786c
commit 549b1c85c3
1 changed files with 4 additions and 3 deletions

View File

@ -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() {