On Monday afternoon the prosecution rested its case against Jason Lee. The former Goldman Sachs executive is on trial in Riverside for the alleged rape of an Irish student in East Hampton in 2013.The final witness for the prosecution testified about the timing and content of numerous text messages Mr. Lee had sent and received on the morning of the alleged rape.Detective Investigator Edward Solomon of the Suffolk County Police Department, who specializes in extracting such information, said Mr. Lee had exchanged a number of text messages with a man named Randy Nicolau after police had launched an investigation into the alleged rape on the morning of Aug. 20, 2013.Police were investigating the reported rape, as well as a report of a missing car, the call that initially took them to the house at 1 Clover Leaf Lane in East Hampton.Prosecutors said Mr. Lee was hiding in the back of his Range Rover, which was parked in the driveway. During the time he was alleged to have been in the car, Mr. Lee also made numerous calls, many of them to taxi companies, and many to Mr. Nicolau, a detective with the Suffolk County district attorney’s office testified on April 15.According Detective Solomon's testimony Monday, in one message to Mr. Nicolau, Mr. Lee wrote, “ ‘Cops still here. Not sure if they are investigating stolen car or me.’ ” That message was sent at 11:01 a.m. The detective said Mr. Nicolau then responded 14 minutes later, writing, “ ‘Where are you? Still in the car?’ ”After his arrest, Mr. Lee attempted to delete numerous text messages he received from the car-sharing service Uber, Detective Solomon said. However, as the defense team clarified on cross-examination, he did not attempt to delete his exchanges with Mr. Nicolau.At 12:24 in the afternoon of Aug. 20, Mr. Lee’s 37th birthday, Detective Solomon said, Mr. Lee sent a text to his wife, Alicia Lee, who was in the city that day: “Yes, I’m sorry, but don’t come out today. I’m healthy, but I’m in trouble.”Earlier on Monday East Hampton Town Police Capt. Chris Anderson testified, identifying retired Detective Jacque F. Jacques Guillois as the lead investigator in the case. The retired detective has been seen in the courthouse during the trial but did not testify.Captain Anderson, who was a detective lieutenant in August 2013, described the alleged victim’s demeanor several hours after the incident. He said that she was shaken and was “crying intermittently.”The first witness for the defense, called on Monday afternoon, was Dr. Lone Thanning, a forensic pathologist. Mr. Lee’s attorneys have said that the sex on Aug. 20, 2013, was consensual.