First set of functional tests for orders

Adding the first set of functional tests for orders, plus supporting
changes to models and additional utility functions in test.utils.

Change-Id: I0f461b23d3256c3b158cedc414bb0cc6b087ff7e
Merge "First set of functional tests for orders"