@Test public void aggregationWithInspectITHeaderTwoDifferent() { final HttpTimerData data = new HttpTimerData(); Map<String, String> map1 = new HashMap<>(); MapUtils.putAll(map1, new String[][] { { HttpTimerData.INSPECTIT_TAGGING_HEADER, "tag1" } }); data.setHeaders(map1); data.getHttpInfo().setUri("URI"); data.getHttpInfo().setRequestMethod("GET"); final HttpTimerData data2 = new HttpTimerData(); Map<String, String> map2 = new HashMap<>(); MapUtils.putAll(map2, new String[][] { { HttpTimerData.INSPECTIT_TAGGING_HEADER, "tag2" } }); data2.setHeaders(map2); data2.getHttpInfo().setUri("URI"); data2.getHttpInfo().setRequestMethod("GET"); final List<HttpTimerData> input = new ArrayList<>(); Collections.addAll(input, data, data2); AggregationPerformer<HttpTimerData> aggregationPerformer = new AggregationPerformer<>(new HttpTimerDataAggregator(false, false)); aggregationPerformer.processCollection(input); final List<HttpTimerData> output = aggregationPerformer.getResultList(); assertThat(output, is(notNullValue())); assertThat(output.size(), is(equalTo(2))); }
tmp.setHeaders(headerMap);
map.clear(); map.put("key", "ablaha"); httpData.setHeaders(map); searchCriteria.setCaseSensitive(false); assertThat(SearchFactory.isSearchCompatible(httpData, searchCriteria, repositoryDefinition), is(equalTo(true))); assertThat(SearchFactory.isSearchCompatible(httpData, wrong, repositoryDefinition), is(equalTo(false))); httpData.setHeaders(Collections.<String, String> emptyMap()); Map<String, String[]> map1 = new HashMap<>(); map1.put("key", new String[] { "blah", "anotherValue" });
Map<String, String> map = new HashMap<>(); MapUtils.putAll(map, new String[][] { { HttpTimerData.INSPECTIT_TAGGING_HEADER, "tag1" } }); data.setHeaders(map); data2.setHeaders(new HashMap<String, String>() { private static final long serialVersionUID = 6328525502662081826L;
data.getHttpInfo().setServerPort(extractor.getServerPort(servletRequestClass, httpServletRequest)); data.getHttpInfo().setQueryString(extractor.getQueryString(servletRequestClass, httpServletRequest)); data.setHeaders(extractor.getHeaders(servletRequestClass, httpServletRequest));