### Question:
NodeKey { public SECP256K1.PublicKey getPublicKey() { return SECP256K1.PublicKey.create( ECPointUtil.getEncodedBytes(securityModule.getPublicKey().getW())); } NodeKey(final SecurityModule securityModule); SECP256K1.Signature sign(final Bytes32 dataHash); SECP256K1.PublicKey getPublicKey(); Bytes32 calculateECDHKeyAgreement(final SECP256K1.PublicKey partyKey);  }### Answer:
@Test public void publicKeyShouldMatch() { final Bytes keyPairPubKey = Bytes.fromHexString( "0x35f48529f73c4172850ed18997d00d101a9aebc130103c23d41d46351c1b1d72ffc8b246af3a446d99a8218bd69e231b75932ea9a79173751dc7eb2eb0e301f2"); final Bytes32 keyPairPrvKey = Bytes32.fromHexString("0xf7a58d5e755d51fa2f6206e91dd574597c73248aaf946ec1964b8c6268d6207b"); final SECP256K1.KeyPair keyPair = SECP256K1.KeyPair.create(SECP256K1.PrivateKey.create(keyPairPrvKey)); final KeyPairSecurityModule keyPairSecurityModule = new KeyPairSecurityModule(keyPair); final NodeKey nodeKey = new NodeKey(keyPairSecurityModule); Assertions.assertThat(nodeKey.getPublicKey().getEncodedBytes()) .isEqualByComparingTo(keyPair.getPublicKey().getEncodedBytes()); Assertions.assertThat(nodeKey.getPublicKey().getEncodedBytes()) .isEqualByComparingTo(keyPairPubKey); }