Add some functional tests