### Question:
Headers { public static String toHttpLanguage(Locale locale) { return locale.toString().replace('_', '-'); } Headers(Message message);  Headers(); static String getUserAgent(); Map<String, List<String>> headerMap(); void writeSessionCookies(Map<String, Cookie> sessionCookies); void removeAuthorizationHeaders(); void setAuthorization(String authorization); void setProxyAuthorization(String authorization); static Map<String, List<String>> getSetProtocolHeaders(final Message message); void readFromConnection(HttpURLConnection connection); void setProtocolHeadersInConnection(HttpURLConnection connection); String determineContentType(); String getAuthorization(); static SimpleDateFormat getHttpDateFormat(); static String toHttpDate(Date date); static String toHttpLanguage(Locale locale); static final String KEY_HTTP_CONNECTION; static final String ADD_HEADERS_PROPERTY; static final String PROTOCOL_HEADERS_CONTENT_TYPE; static final String HTTP_HEADERS_SETCOOKIE; static final String HTTP_HEADERS_LINK; static final String EMPTY_REQUEST_PROPERTY; }### Answer:
@Test public void httpLanguage() { Locale locale = new Locale("en", "US"); assertEquals("en-US", Headers.toHttpLanguage(locale)); locale = new Locale("de"); assertEquals("de", Headers.toHttpLanguage(locale)); locale = new Locale("aa", "ZZ"); assertEquals("aa-ZZ", Headers.toHttpLanguage(locale)); locale = new Locale("es", ""); assertEquals("es", Headers.toHttpLanguage(locale)); }