### Question:
ECKey implements Serializable { public void verifyMessage(String message, String signatureBase64) throws SignatureException { ECKey key = ECKey.signedMessageToKey(message, signatureBase64); if (!Arrays.equals(key.getPubKey(), pub)) throw new SignatureException("Signature did not match for message"); } ECKey();  ECKey(BigInteger privKey);  ECKey(BigInteger privKey, BigInteger pubKey);  ECKey(@Nullable byte[] privKeyBytes, @Nullable byte[] pubKey);  ECKey(@Nullable EncryptedPrivateKey encryptedPrivateKey, @Nullable byte[] pubKey, KeyCrypter keyCrypter);  ECKey(@Nullable BigInteger privKey, @Nullable byte[] pubKey, boolean compressed); private  ECKey(@Nullable BigInteger privKey, @Nullable byte[] pubKey); static ECKey fromASN1(byte[] asn1privkey); boolean isPubKeyOnly(); boolean hasPrivKey(); byte[] toASN1(); static byte[] publicKeyFromPrivate(BigInteger privKey, boolean compressed); byte[] getPubKeyHash(); byte[] getPubKey(); boolean isCompressed(); String toString(); String toStringWithPrivate(); Address toAddress(NetworkParameters params); void clearPrivateKey(); ECDSASignature sign(Sha256Hash input); ECDSASignature sign(Sha256Hash input, @Nullable KeyParameter aesKey); static boolean verify(byte[] data, ECDSASignature signature, byte[] pub); static boolean verify(byte[] data, byte[] signature, byte[] pub); boolean verify(byte[] data, byte[] signature); boolean verify(Sha256Hash sigHash, ECDSASignature signature); boolean isPubKeyCanonical(); static boolean isPubKeyCanonical(byte[] pubkey); String signMessage(String message); String signMessage(String message, @Nullable KeyParameter aesKey); static ECKey signedMessageToKey(String message, String signatureBase64); void verifyMessage(String message, String signatureBase64); @Nullable static ECKey recoverFromSignature(int recId, ECDSASignature sig, Sha256Hash message, boolean compressed); @Nullable byte[] getPrivKeyBytes(); DumpedPrivateKey getPrivateKeyEncoded(NetworkParameters params); long getCreationTimeSeconds(); void setCreationTimeSeconds(long newCreationTimeSeconds); @Override boolean equals(Object o); @Override int hashCode(); ECKey encrypt(KeyCrypter keyCrypter, KeyParameter aesKey); ECKey decrypt(KeyCrypter keyCrypter, KeyParameter aesKey); static boolean encryptionIsReversible(ECKey originalKey, ECKey encryptedKey, KeyCrypter keyCrypter, KeyParameter aesKey); boolean isEncrypted(); @Nullable EncryptedPrivateKey getEncryptedPrivateKey(); KeyCrypter getKeyCrypter(); static final ECDomainParameters CURVE; static final BigInteger HALF_CURVE_ORDER; @VisibleForTesting
    static boolean FAKE_SIGNATURES; }### Answer:
@Test public void verifyMessage() throws Exception { String message = "hello"; String sigBase64 = "HxNZdo6ggZ41hd3mM3gfJRqOQPZYcO8z8qdX2BwmpbF11CaOQV+QiZGGQxaYOncKoNW61oRuSMMF8udfK54XqI8="; Address expectedAddress = new Address(MainNetParams.get(), "14YPSNPi6NSXnUxtPAsyJSuw3pv7AU3Cag"); ECKey key = ECKey.signedMessageToKey(message, sigBase64); Address gotAddress = key.toAddress(MainNetParams.get()); assertEquals(expectedAddress, gotAddress); }