Fixed api path
Added functional tests