### Question:
HttpConnection implements Connection { public Connection userAgent(String userAgent) { Validate.notNull(userAgent, "User agent must not be null"); req.header("User-Agent", userAgent); return this; } private  HttpConnection(); static Connection connect(String url); static Connection connect(URL url); Connection url(URL url); Connection url(String url); Connection userAgent(String userAgent); Connection timeout(int millis); Connection followRedirects(boolean followRedirects); Connection referrer(String referrer); Connection method(Method method); Connection ignoreHttpErrors(boolean ignoreHttpErrors); Connection ignoreContentType(boolean ignoreContentType); Connection data(String key, String value); Connection data(Map<String, String> data); Connection data(String... keyvals); Connection header(String name, String value); Connection cookie(String name, String value); Document get(); Document post(); Connection.Response execute(); Connection.Request request(); Connection request(Connection.Request request); Connection.Response response(); Connection response(Connection.Response response);  }### Answer:
@Test public void userAgent() { Connection con = HttpConnection.connect("http: con.userAgent("Mozilla"); assertEquals("Mozilla", con.request().header("User-Agent")); }