“It may surprise some to discover that we are not the gun-toting, globe-trotting, martini-drinking spies frequently portrayed on the silver screen,” the C.I.A. website says, adding that the work of most intelligence officers resembles “any other nine-to-five job in terms of logistics and lifestyle.”

The trial testimony has focused on a corner of the C.I.A.’s Center for Cyber Intelligence, where Mr. Schulte worked until his resignation in 2016. Every developer in Mr. Schulte’s group, which was predominantly made up of men, had top-secret security clearance, one witness testified.

The group worked on classified projects, writing the code that allowed other C.I.A. officers to carry out sophisticated cyber operations and penetrate the computer networks of foreign targets.

Though Mr. Schulte’s former co-workers said the office was focused on the national security mission, it was also a breeding ground for sophomoric pranks and fights.

One C.I.A. employee, identified only as Michael, testified that he and Mr. Schulte once flicked each other with rubber bands until late at night in the office. The fight escalated, and they wrecked each other’s desks. Then, backed up against a desk, Michael said he hit Mr. Schulte.

Another C.I.A. employee, who used the pseudonym Jeremy Weber, testified that once, when he left his computer open, Mr. Schulte used it to send a profane message to everyone in their group under Mr. Weber’s name.

In the prank message, “Mr. Weber” described himself as a jerk, using a cruder term.

Insults regularly flew in the office. One co-worker with braces was known as “metal mouth,” Mr. Weber testified. Mr. Schulte was mocked for being bald.