Add unittest to functional tests