Property-based testing

TODO.