Added functional tests for card api