static boolean allowDestinationRange(String prev, String next)
    {
        if (prev.isEmpty() || next.isEmpty())
        {
            return false;
        }
        int prevCode = prev.codePointAt(0);
        int nextCode = next.codePointAt(0);

        // Allow the new destination string if:
        // 1. It is sequential with the previous one and differs only in the low-order byte
        // 2. The previous string does not contain any UTF-16 surrogates
        return allowCodeRange(prevCode, nextCode) && prev.codePointCount(0, prev.length()) == 1;
    }
@Test
    void testAllowDestinationRange()
    {
        // Denied (bogus)
        assertFalse(ToUnicodeWriter.allowDestinationRange("", ""));
        assertFalse(ToUnicodeWriter.allowDestinationRange("0", ""));
        assertFalse(ToUnicodeWriter.allowDestinationRange("", "0"));

        // Denied (non sequential)
        assertFalse(ToUnicodeWriter.allowDestinationRange("0", "A"));
        assertFalse(ToUnicodeWriter.allowDestinationRange("A", "a"));

        // Denied (overflow)
        assertFalse(ToUnicodeWriter.allowDestinationRange("ÿ", "Ā"));

        // Allowed (sequential w/o surrogate)
        assertTrue(ToUnicodeWriter.allowDestinationRange(" ", "!"));
        assertTrue(ToUnicodeWriter.allowDestinationRange("(", ")"));
        assertTrue(ToUnicodeWriter.allowDestinationRange("0", "1"));
        assertTrue(ToUnicodeWriter.allowDestinationRange("a", "b"));
        assertTrue(ToUnicodeWriter.allowDestinationRange("A", "B"));
        assertTrue(ToUnicodeWriter.allowDestinationRange("À", "Á"));
        assertTrue(ToUnicodeWriter.allowDestinationRange("þ", "ÿ"));

        // Denied (ligatures)
        assertFalse(ToUnicodeWriter.allowDestinationRange("ff", "fi"));
    }