Refactored functional tests to remove duplication.
New test for storing data in ORM