Add functional tests.
Add functional tests.