RequestBean expResult = new RequestBean();
expResult.setUrl(new URL("http://localhost:10101/"));
expResult.setMethod(HTTPMethod.POST);
expResult.addHeader("key1", "value1");
ContentType contentType = new ContentTypeBean("text/plain", Charsets.UTF_8);
expResult.setBody(new ReqEntityStringBean("Body Text", contentType));
BasicAuthBean auth = new BasicAuthBean();
auth.setPreemptive(true);
auth.setRealm("realm");
auth.setUsername("username");