Refactoring tests so that they can be used as documentation