Early in my career I interviewed at a small game company. It was located in a crappy town, and when I arrived the CEO walked me around their work environment, which was mostly cubicles in hallways and multiple devs crammed in offices.
Then we sat down in his office and he handed me a programming quiz. While young, I was an accomplished dev with my name on a multiple published products. The first question was unclear, it didn't specify if I was to optimize for speed or memory or maintenance cost. So I got up, walked out, handed him the unstarted exam and left to take a job at Apple. Where I was highly rated in every performance review and extolled for my ability to work well with others.
People who don't want to take coding exams fall into two rough categories.
1) They are fakers, their resume claims are BS and they are afraid of being unmasked.
2) They are very good developers, and don't like tests. Maybe because of test anxiety, maybe they find them insulting given their career accomplishments, or mostly because they know they have little to no bearing on how good a developer they are. The reasons I refused the test that day was a combination of all three.
One example, even today I can't whiteboard anything to do with binary trees, because in 30 years of professional development I've never had to do anything with them, and can no longer remember any of the binary tree algorithms from my comp-sci classes.
My recommendation to you (as someone who has hired over 40 devs in my career) is to do paired programming tests with candidates. You can get a much clearer idea of their thought process and abilities, and it's a far friendlier and respectful process.
Too many managers measure the process cost only in their own time. They think, oh, I'll give 10 candidates a test to filter out the worst ones and then I only have to spend my time interviewing the top two or three. First you are ignoring how easy it is to cheat those tests and how little they apply to actual dev work, which means your top two or two are not likely to be your best two out of the ten. But you are also ignoring the possibility that four others refused to test and two of them were likely as good or better than anyone in your test group.
I will never take a coding test again. When someone requests one, they tend to be a crap company with poor software dev practices and a huge noisy open floor plan.