First functional test specced in comments, moved to unittest.