### Question:
B2Utf8Util { public static void write(String str, OutputStream out) throws IOException { final int strLen = str.length(); for (int i=0; i < strLen; i++) { final char c = str.charAt(i); i = doCommonWrite(str, i, c, out); } }  static void write(String str,
                             OutputStream out); static void writeJsonString(CharSequence value,
                                       OutputStream out);  }### Answer:
@Test public void testWrite() throws IOException { int numTested = 0; int numBaddish = 0; for (int codePoint = 0; codePoint <= MAX_CODE_POINT; codePoint++) { final String codePointStr = stringForCodePoint(codePoint); try { if (codePoint >= 0xD800 && codePoint <= 0xDFFF) { checkBadSurrogateLikeCodePoint(codePointStr); numBaddish++; } else { checkValidCodePoint(codePointStr); } numTested++; } catch (Throwable t) { throw new RuntimeException("trouble for codePoint " + codePointNum(codePoint) + ": " + t, t); } } System.err.println("testWrite: tested " + numTested + " code points, including " + numBaddish + " bad-ish ones."); }