BRCA2 mutations can be detected through genetic testing, which involves analyzing a blood or saliva sample for specific genetic changes. Genetic counseling is recommended before and after testing to understand the implications of test results and to make informed decisions about risk management.