Add IntegrationTest for PrimaryKeys & UniqueIndexs

Also contains fixes to make PrimaryKeys work
perfectly..

Change-Id: I8dbb9264aeefa2a6ea86827e21ac54780319e0bd
Merge "Add IntegrationTest for PrimaryKeys & UniqueIndexs"