Fix example.
Add (and fix) tests.