JavaApiConverter { private static Headers extractOkHeaders(CacheResponse javaResponse) throws IOException { Map<String, List<String>> javaResponseHeaders = javaResponse.getHeaders(); return extractOkHeaders(javaResponseHeaders); } private  JavaApiConverter(); static Response createOkResponseForCachePut(URI uri, URLConnection urlConnection); static Request createOkRequest(
      URI uri, String requestMethod, Map<String, List<String>> requestHeaders); static CacheResponse createJavaCacheResponse(final Response response); static java.net.CacheRequest createJavaCacheRequest(final CacheRequest okCacheRequest);  }
@Test public void extractOkHeaders() { Map<String, List<String>> javaResponseHeaders = new HashMap<>(); javaResponseHeaders.put(null, Arrays.asList("StatusLine")); javaResponseHeaders.put("key1", Arrays.asList("value1_1", "value1_2")); javaResponseHeaders.put("key2", Arrays.asList("value2")); Headers okHeaders = JavaApiConverter.extractOkHeaders(javaResponseHeaders); assertEquals(3, okHeaders.size()); assertEquals(Arrays.asList("value1_1", "value1_2"), okHeaders.values("key1")); assertEquals(Arrays.asList("value2"), okHeaders.values("key2")); }