Refactored tests to follow the guidelines