class StringUtil {

    public static boolean isAscii(@NonNull String text) {
        Objects.requireNonNull(text, "text is null");
        return StandardCharsets.US_ASCII.newEncoder().canEncode(text);
    }

}

class StringUtilTest {

    @Test
    public void asciiTest() {

        assertFalse(StringUtil.isAscii("Réal"));
        assertTrue(StringUtil.isAscii("Real"));
    }

}