What is the best way to learn writing tests?
Those can be something like "when someone upvotes on a comment, then the comment should have +1 score" ...
Another thing that might help you is watching someone actually do TDD, for which I can recommend Destroy All Software screencasts https://www.destroyallsoftware.com/