refactoring unit test for title