}
@Test public void method() {
Connection con = HttpConnection.connect("http://example.com/");
assertEquals(Connection.Method.GET, con.request().method());
con.method(Connection.Method.POST);
assertEquals(Connection.Method.POST, con.request().method());
}
@Test(expected=IllegalArgumentException.class) public void throwsOnOdddData() {
Connection con = HttpConnection.connect("http://example.com/");