Added functional API tests.

Change-Id: If876c70de2e3327b8e7950fcfdee6a7ac021778c