tests from http://natureofcode.com/book/