Add functional tests.