@Test
public void testDecodeUrlEncodedText() throws Throwable {

    String textPlain = "param1=value1&param2=value 2&param3=value три";
    byte[] textEncoded = URLEncoder.encode(textPlain, Utils.CHARSET).getBytes(Utils.CHARSET);
    String textDecoded = Utils.decodeIfText(ByteBuffer.wrap(textEncoded),
            Operation.MEDIA_TYPE_APPLICATION_X_WWW_FORM_ENCODED);
    Assert.assertEquals(textPlain, textDecoded);
}