Bill Cosby to testify in sexual assault case