Detection of BRCA1 and BRCA2 mutations is typically done through genetic testing. This involves analyzing a blood or saliva sample to look for specific mutations in these genes. Genetic counseling is recommended before and after testing to help understand the risks, benefits, and potential outcomes of the test.