Change before to beforeEach and implement changes in Listing 11.46