Create a test class that has Comment as its reference class. Create a test that checks whether the author and rating details are stored correctly after creation. Record separate tests that check whether the upvote and downvote methods work as expected.