Fixed merge and unit test issues.
trq-2061 added unit tests for new functions and fixed a broken unit test.