Add tests for options.

Also: refactor tests. Duplicate code is as evil in tests as it is in
your normal code. All those calls are now extracted in one method.