### Question:
HttpUtils { static String getUserAgent(final ClientConfiguration config) { String userAgent = null; if (config != null) { userAgent = config.getUserAgent(); } if (userAgent == null) { userAgent = ClientConfiguration.DEFAULT_USER_AGENT; } else if (!ClientConfiguration.DEFAULT_USER_AGENT.equals(userAgent)) { userAgent += ", " + ClientConfiguration.DEFAULT_USER_AGENT; } return userAgent; }  static String urlEncode(final String value, final boolean path); static String urlDecode(final String value); static boolean isUsingNonDefaultPort(URI uri); static boolean usePayloadForQueryParameters(Request<?> request); static String encodeParameters(Request<?> request); static String appendUri(String baseUri, String path); static String appendUri(final String baseUri, String path,
            final boolean escapeDoubleSlash); static InputStream fetchFile(
            final URI uri,
            final ClientConfiguration config);  }### Answer:
@Test public void testGetUserAgent() { assertEquals(HttpUtils.getUserAgent(null), ClientConfiguration.DEFAULT_USER_AGENT); final ClientConfiguration conf = new ClientConfiguration(); assertEquals(HttpUtils.getUserAgent(conf), ClientConfiguration.DEFAULT_USER_AGENT); conf.setUserAgent("New"); assertEquals(HttpUtils.getUserAgent(conf), "New, " + ClientConfiguration.DEFAULT_USER_AGENT); }