Added functional tests.