Tech companies, Apple and Infosys, have won a case, in which they were sued by a whistleblower for allegedly bringing trainers into the US, illegally and fraudulently, to avoid the expense and difficulty of obtaining H-1B visas.

Judge Lucy Koh of the US District Court in San Jose ruled last Tuesday that the lawsuit filed in 2016 by former Apple employee Carl Krawitt, contained inflammatory claims.

In the lawsuit, whistleblower Krawitt claimed that Apple “schemed” and “conspired” with controversial Indian firm Infosys to bring trainers in the US. According to the former Apple employee who started working there in 2014, the company brought two Indian citizens to the US, to provide training for the engineering team behind online sales. Which work, according to him, could have been performed by American citizens.

Further, in the lawsuit Krawitt claims that when he attempted to warn one of the senior managers at Infosys, that both companies were illegally obtaining B1 visa, he was threatened to keep quiet or otherwise he would lose his job.

However, Judge Koh decided that lawsuit’s claims were inflammatory, however, leaving the opportunity to Krawitt to amend his complaints with supporting facts.

As per Apple, the company earlier in June argued in a court filing that its former employee did not understand the US immigration laws properly.

They pointed out that they were based in US laws which “permit non-immigrants to enter the United States on B-1 visas for ‘business’ that is incidental to international commerce,” when they brought two Indian trainers to US.

As per claims that the work of the trainers could have been performed by US trainers, Judge Koh said that the B-1 visa existed to give a chance to foreign competition.

“If Congress intended to shield all industries from foreign competition, then the B-1 visa likely would not exist,” Koh said in her ruling.

The H-1B visa is a three-year permit, with a possibility of another three year extension, for skilled foreign citizens to come to the US and fill work gaps, which cannot be filled by American citizens.