I think I cut out a small piece of my friend's hair and kept it in a sealed bag
Why would you do something that sneaky?
I wanted to test the DNA in a laboratory if it was hers
It seems a little rude to cut your friends hair off and save it just to test their DNA. If this is something that your friend asked you to do then it would make more sense, however if they did not then it sounds like a complete invasion of personal privacy.
I just wanted test it out. I wanted to confirm a theory.
You should have asked them to have a sample first. It is not a good idea to cut off some of their hair without their explicit permission.