add tests for toCompressedPubKey