Unit test from Ex. 17