@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.");
}