Replace functional tests with unit tests.