Add tests to be used in docs.
Code to use in docs.