1. Added functional tests. 2. Added negative tests. Change-Id: Id346b66c024161a3755abfa5137f91e38759da21