JavaApiConverter { private static String extractStatusLine(HttpURLConnection httpUrlConnection) { return httpUrlConnection.getHeaderField(null); } 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 extractStatusLine() throws Exception { 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")); assertEquals("StatusLine", JavaApiConverter.extractStatusLine(javaResponseHeaders)); try { JavaApiConverter.extractStatusLine(Collections.<String, List<String>>emptyMap()); fail(); } catch (IOException expected) { } }