Listing 7.2 Refactoring and testing the new Post Service.