public static int hashCodeAscii(byte[] bytes, int startPos, int length) {
        return !hasUnsafe() || !unalignedAccess() ?
                hashCodeAsciiSafe(bytes, startPos, length) :
                PlatformDependent0.hashCodeAscii(bytes, startPos, length);
    }
@Test
    public void testHashCodeAscii() {
        for (int i = 0; i < 1000; ++i) {
            // byte[] and char[] need to be initialized such that there values are within valid "ascii" range
            byte[] bytes = new byte[i];
            char[] bytesChar = new char[i];
            for (int j = 0; j < bytesChar.length; ++j) {
                bytesChar[j] = randomCharInByteRange();
                bytes[j] = (byte) (bytesChar[j] & 0xff);
            }
            String string = new String(bytesChar);
            assertEquals(hashCodeAsciiSafe(bytes, 0, bytes.length),
                         hashCodeAscii(bytes, 0, bytes.length),
                        "length=" + i);
            assertEquals(hashCodeAscii(bytes, 0, bytes.length),
                        hashCodeAscii(string),
                        "length=" + i);
        }
    }