Now with tests that actually exercise the code we care about.