* @throws IOException
* @throws JSONException
*/
@Test
public void createMultiformTest() throws IOException, JSONException {
Resty r = new Resty();
//TextResource text = r.text("http://www.cs.tut.fi/cgi-bin/run/~jkorpela/echoraw.cgi",
TextResource text = r.text("http://localhost:9998/mime/multipart",
form(data("bubu", "lala"), data("schön", "böööh")));
String result = text.toString();
System.out.println(result);
assertTrue(result.contains("bubu") && result.contains("=?ISO-8859-1?Q?sch=F6n?="));
JSONObject json = new JSONObject();
json.put("bubu", "lala");
text = r.text("http://localhost:9998/mime/multipart", form(data("someJson", content(json)), data("someText", "Text")));
result = text.toString();
System.out.println(result);
assertTrue(result.contains("someJson") && result.contains("application/json") && result.contains("someText"));
}