Adjust code of unit test to code in slides.