That sounds an awful lot like what I went through with one job interview back in the mid-1970s, which was then the heyday of "affirmative action", not for H1B foreign workers but US citizens of "minority" or "disadvantaged" class, which meant mainly women and Afro-Americans. One of the requirements was to take a test in basic logic skills, designing system flow, programming, flow charting, just basic IT stuff. There were like 10-12 of us taking the test, I was the only white dude. I blew through the test in half the time of anyone else, got the highest score. So they changed the test and re-tested everybody. Same result. So they changed it again and re-tested everybody. By now I could see what they were doing, changing the test to get the outcome they wanted (kinda like 'Rats and election recounts). But the same result happened again. Finally they threw in the towel and just told me that while I got the highest scores they were "selecting another applicant" for "other" reasons. I talked to a lawyer and he said I had a case for discrimination, but it would cost me and even if I got the job they'd make my life miserable for causing them the trouble. So I said to hell with it.
In the future, employment tests will have questions such as: "Name a member of the Wu Tang Clan." "Name three artists affiliated with Death Row Records." "What NBA team does Carmelo Anthony play for?"
That reminds me of a test I took for an actuarial position with an insurance company back in 1985. I scored an 89 on the test. It was not high enough to be hired. The interviewer showed me the grading chart. One thing I noticed were that there where 2 columns. The second column was for minorities. For the same amount of questions that I got wrong, if I were a minority I would have scored a 97 ( high enough to be hired ). The minority scores were "adjusted".