Keypair unit tests

Change-Id: I217a9c6abd52fd423e775459334e590a8e1549e7