Adding some functional tests