Artificial IntelligenceCryptocurrencyMetaverseCybersecurityTech Forward

This Man Says U.S. Customs Detained Him and Made Him Take a Test to Prove He’s a Software Engineer

March 1, 2017, 7:37 AM UTC

A Nigerian software engineer for an international start-up says he was detained at the airport when he entered the U.S. for a business trip—and then asked to take a test proving that he was a real-life tech savant.

Professional networking site LinkedIn published his story in a blog post Tuesday, reporting that 28-year-old Celestine Omin was grilled about his work and asked to demonstrate his engineering skills by answering questions that sounded technical, but to an actual engineer made little sense.

All that after 24 hours of transit in an economy cabin.

According to LinkedIn, Omin works for a start-up called Andela, which helps American tech firms find top talent in Africa. Andela is a highly selective program supported by Facebook (FB) CEO Mark Zuckerberg, accepting only about 1% of applicants. Born in Lagos, Nigeria, Omin had never been to the U.S. before, and was set to join the New York office of fintech firm First Access. LinkedIn reports that Omin had secured a short-term visa for the job.

But his documents didn’t get him past the Customs and Border Patrol agents he met on arrival at John F. Kennedy International Airport. Omin said he was taken to a private room and asked bizarre questions about binary search trees.

“Write a function to check if a Binary Search Tree is balanced,” Omin reportedly recalled being asked. “What is an abstract class, and why do you need it?”

Omin told LinkedIn the questions could be open to interpretation, and struck him as sample quizzes that someone with no technical knowledge might come across by Googling, “Questions to ask a software engineer.”

For more on immigration policy and tech, watch Fortune’s video:

After completing the questions, Omin was told by the office that his answers were incorrect. Confused, sleep deprived, and beginning to fear that he would soon be deported, Omin was eventually told he was free to go.

While in detention, customs officials had contacted Andela to verify Omin’s placement, LinkedIn reports. The company said it had helped recruit more than 100 African developers last year and none had experienced any such inquiries or examinations.

The U.S. Customs and Border Protection agency did not respond to LinkedIn’s request for comment.