Implemented functional tests