SAN JOSE — When billionaire business partners David Cheriton and Andy Bechtolsheim founded Arista Networks Inc. in 2004, they opted for the $7,500 “boilerplate package” of legal documents.

The men had known each other for decades, launched two previous companies together and were co-investors in several more—including, most famously, Google Inc. They never imagined anything would go wrong.

“We started the company as friends that trusted each other,” Bechtolsheim told the court Thursday.