public void testRussianInRequestBody() throws IOException {
PostMethod httppost = new PostMethod("/");
String s = constructString(RUSSIAN_STUFF_UNICODE);
// Test UTF-8 encoding
httppost.setRequestEntity(
new StringRequestEntity(s, "text/plain", CHARSET_UTF8));
verifyEncoding(httppost.getRequestEntity(), RUSSIAN_STUFF_UTF8);
// Test KOI8-R
httppost.setRequestEntity(
new StringRequestEntity(s, "text/plain", CHARSET_KOI8_R));
verifyEncoding(httppost.getRequestEntity(), RUSSIAN_STUFF_KOI8R);
// Test WIN1251
httppost.setRequestEntity(
new StringRequestEntity(s, "text/plain", CHARSET_WIN1251));
verifyEncoding(httppost.getRequestEntity(), RUSSIAN_STUFF_WIN1251);
}