Tim Cook sworn in to testify