functionaltests extracted from unittests