Generally if you are hiring on work product skills (coding for software folks) and can show that your test is unbiased and you hire to the test, then you can avoid being found guilty of discrimination even if you hire a disproportionate number of a certain group. To be rock solid you also need to show that your applicant pool is highly diversified and has representation from all groups. Sometimes that means going out and seeking out candidates (like women or hispanics) who are self selecting to not apply. And why you really do better if you blind the resumes your HR staff sees before they sort them into phone screen and skip piles.
This is a great point and it's why I always include FizzBuzz in any interview—no matter how they were referred, how impressive their resume is, or their confidence level.
Having consistent benchmarks helps give you legal cover, but it's also essential to running a solid interview process. If you're not applying the same tests to all candidates, it's impossible to detect problems in your filters and you can easily end up making biased decisions or hiring the wrong people.
Yes, I understand that it can be annoying to have to solve such a basic problem in an interview, but it only takes a few minutes—just get it over with, it's not meant as an insult.
Personal bias also potentially factors into how you describe it (so consider presenting it written, in the same format for everyone). E.g. let's say the interviewer goes into extra detail or ask for confirmation of understanding from candidates they favour.