Genetic testing can identify mutations that increase the risk of developing certain cancers. For instance, mutations in the BRCA1 and BRCA2 genes elevate the risk for breast and ovarian cancer. This information can be crucial for risk assessment and preventive strategies.