Made the README example code into a test case.