Add getPrivateKey and test case (failed so far)