"What is an abstract class and why do you need it?"

"Write a function to check if a Binary Search Tree is balanced."

Those are the questions that Celestine Omin says he was asked by border officials at JFK Airport to prove that he was an engineer.

The 28-year-old was traveling from Lagos, Nigeria, last weekend on a work trip for his employer, startup Andela.

He was told that he didn't look like an engineer and needed to take the test to prove it, according to Andela. He was handed a white sheet of paper and two incredibly difficult computer science questions.

Andela is backed by Mark Zuckerberg and Priscilla Chan's fund, the Chan Zuckerberg Initiative, and it is incredibly selective. It trains software developers in Africa and gives them full-time roles at international companies. It has over 215 developers in Lagos and Nairobi who work with more than 60 companies.

After three hours -- and a call between U.S. Customs and Border Protection and Andela cofounder Christina Sass -- he was let go.

In a statement to CNNTech, CBP wrote that it "does not administer written tests to verify a traveler's purpose of travel."

"[Our] officers strive to treat all people arriving in the country with dignity and respect," the statement read.

Related: 'I'm terrified to leave the country'

Sass told CNNTech that its developers are frequently traveling in and out of the U.S. for short-term work visits. She estimated that in 2016, there were more than 70 trips taken. Nothing of this nature has ever happened.

"We absolutely want to be play by the rules -- we just need to know what they are," said Sass.

This comes at a time when foreigners and immigrants are feeling the effects of the new administration's stance on increased border patrolling. When President Trump took office, he signed an executive order for "extreme vetting" of people from seven majority Muslim countries. The order has since been blocked in the courts, but Trump is expected to issue a revised one next week. He's also considering an executive order to reevaluate and revamp various work visas.

After the incident, Andela said it followed up via phone and email to Customs to better understand what sort of information it needs to ensure something like what happened to Omin doesn't happen again. It has not heard back.

"If we want to maintain our position in the world or, better yet, enhance it, we need to do better," wrote Sass and cofounder Jeremy Johnson in a post about the incident on Thursday.

"The technologists of tomorrow will be every race, gender and religion, and they will hail from every corner of the globe." wrote Sass and Johnson.

CNN Politics' Tal Kopan contributed to this report.