add cucumber tests to demonstrate function

page 371