Refactoring the test and adding new ones