Make existing unit tests work with new code base. Also add new tests for new code to existing tests.
Copied code from customer installation with working implementation.