Refactors phone_book tests.