[#1821] Adding functional tests