bb = ByteBuffer.wrap(bytearray);
cb = CharBuffer.allocate(20);
((CharsetDecoderICU)decoder).setToUCallback(CoderResult.OVERFLOW, CharsetCallback.TO_U_CALLBACK_ESCAPE, null); // This callback is not valid.
for (int i = 0; i < context2.length; i++) {
decoder.reset();
cb.position(0);
bb.position(0);
((CharsetDecoderICU)decoder).setToUCallback(CoderResult.malformedForLength(1), CharsetCallback.TO_U_CALLBACK_ESCAPE, context2[i]); // This callback is valid.
result = decoder.decode(bb, cb, true);