@Test public void flattenHeaders_EmptyValueListGiven_ShouldFilterOutHeader() { Map<String, List<String>> listHeaders = new HashMap<>(); listHeaders.put("a_k", singletonList("a_v")); listHeaders.put("b_k", new ArrayList<>()); listHeaders.put("c_k", singletonList("c_v")); Map<String, String> flattenedHeaders = flattenHeaders(listHeaders); assertEquals(ImmutableMap.of("a_k", "a_v", "c_k", "c_v"), flattenedHeaders); }
public static Map<String, String> flattenHeaders(Map<String, List<String>> headers) { return flattenHeaders(headers, headerName -> true); }
HeaderUtils { public static Map<String, String> flattenHeaders(Map<String, List<String>> headers) { return flattenHeaders(headers, headerName -> true); } }
HeaderUtils { public static Map<String, String> flattenHeaders(Map<String, List<String>> headers) { return flattenHeaders(headers, headerName -> true); } private  HeaderUtils(); }
HeaderUtils { public static Map<String, String> flattenHeaders(Map<String, List<String>> headers) { return flattenHeaders(headers, headerName -> true); } private  HeaderUtils(); static Map<String, String> flattenHeaders(Map<String, List<String>> headers); static Map<String, String> flattenHeaders(Map<String, List<String>> headers,
			Predicate<String> headerNameFilter); static Map<String, List<String>> expandHeaders(Map<String, String> headers); }
HeaderUtils { public static Map<String, String> flattenHeaders(Map<String, List<String>> headers) { return flattenHeaders(headers, headerName -> true); } private  HeaderUtils(); static Map<String, String> flattenHeaders(Map<String, List<String>> headers); static Map<String, String> flattenHeaders(Map<String, List<String>> headers,
			Predicate<String> headerNameFilter); static Map<String, List<String>> expandHeaders(Map<String, String> headers);  }