public void f_test_utf_1() throws Exception {
byte[] bytes = decodeHex("C2FF".toCharArray());
String content = new String(bytes, "UTF-8");
UTF8Decoder charsetDecoder = new UTF8Decoder();
int scaleLength = (int) (bytes.length * (double) charsetDecoder.maxCharsPerByte());
char[] chars = ThreadLocalCache.getChars(scaleLength);
CharBuffer charBuffer = CharBuffer.wrap(chars);
IOUtils.decode(charsetDecoder, ByteBuffer.wrap(bytes), charBuffer);
charsetDecoder.decode(ByteBuffer.wrap(bytes), charBuffer, true);
int position = charBuffer.position();
Assert.assertEquals(content, new String(chars, 0, position));
}