Commit e1b6ddf5 by Roy Clarkson

Format whitespace

parent 3794213a
...@@ -34,35 +34,35 @@ import static org.mockito.MockitoAnnotations.initMocks; ...@@ -34,35 +34,35 @@ import static org.mockito.MockitoAnnotations.initMocks;
*/ */
public class ProxyRequestHelperTests { public class ProxyRequestHelperTests {
@Mock @Mock
private TraceRepository traceRepository; private TraceRepository traceRepository;
@Before @Before
public void init() { public void init() {
initMocks(this); initMocks(this);
} }
@Test @Test
public void buildZuulRequestHeadersWork() { public void buildZuulRequestHeadersWork() {
MockHttpServletRequest request = new MockHttpServletRequest("GET", "/"); MockHttpServletRequest request = new MockHttpServletRequest("GET", "/");
request.addHeader("singleName", "singleValue"); request.addHeader("singleName", "singleValue");
request.addHeader("multiName", "multiValue1"); request.addHeader("multiName", "multiValue1");
request.addHeader("multiName", "multiValue2"); request.addHeader("multiName", "multiValue2");
ProxyRequestHelper helper = new ProxyRequestHelper(); ProxyRequestHelper helper = new ProxyRequestHelper();
helper.setTraces(traceRepository); helper.setTraces(traceRepository);
MultiValueMap<String, String> headers = helper.buildZuulRequestHeaders(request); MultiValueMap<String, String> headers = helper.buildZuulRequestHeaders(request);
List<String> singleName = headers.get("singleName"); List<String> singleName = headers.get("singleName");
assertThat(singleName, is(notNullValue())); assertThat(singleName, is(notNullValue()));
assertThat(singleName.size(), is(1)); assertThat(singleName.size(), is(1));
List<String> multiName = headers.get("multiName"); List<String> multiName = headers.get("multiName");
assertThat(multiName, is(notNullValue())); assertThat(multiName, is(notNullValue()));
assertThat(multiName.size(), is(2)); assertThat(multiName.size(), is(2));
List<String> missingName = headers.get("missingName"); List<String> missingName = headers.get("missingName");
assertThat(missingName, is(nullValue())); assertThat(missingName, is(nullValue()));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment