I do not have experience with such cases but from what I have read, the most important thing is that a neutral person is present when the test is done. This can be, for example, a doctor, public health official or worker at the Jugendamt. You need to be sure that any test you use will be recognised by the authorities. I advise you contact the local Jugendamt to ask how they do this procedure and also what costs are involved..
Here is some information from a company that provides such a service. However, note this is not a government institution but rather a company who provides this service for a fee:
Here is some additional information (via an online translation) about the legal background to such a procedure:
Let us know if you have any further questions.