Adds test for ex. 4.2.