Added functional tests and unittest helpers