Renamed shared unit test logic and added some comments.