I and my ex had to provide ADN samples to justify that her baby wasn't mine. We had lived separately for nearly 2 years, but the baby was born before our divorce was official, hence without a father's name government was saying it was mine. Both of us were agreeing to the judge it wasn't mine, but she didn't want to reveal the real name of the father, because it was an abusive person.
As much as I dreamed to have an afro haircut as a kid, the baby was obviously not mine with darker skin, dark frizzy hairs typical of black people while I and my ex are both whites and blonds.