How does genetic testing for cancer work?