unit tests for parsePublicKey