@Test
public void signMessage() throws AddressMalformedException, MissingPrivateKeyException, KeyIsEncryptedException {

    WalletPocketHD pocketHD = new WalletPocketHD(rootKey, BTC, null, null);
    pocketHD.getReceiveAddress(); // Generate the first key
    SignedMessage signedMessage = new SignedMessage("1KUDsEDqSBAgxubSEWszoA9xscNRRCmujM", MESSAGE);
    pocketHD.signMessage(signedMessage, null);
    assertEquals(EXPECTED_BITCOIN_SIG, signedMessage.getSignature());
    signedMessage = new SignedMessage("1KUDsEDqSBAgxubSEWszoA9xscNRRCmujM", MESSAGE_UNICODE);
    pocketHD.signMessage(signedMessage, null);
    assertEquals(EXPECTED_BITCOIN_SIG_UNICODE, signedMessage.getSignature());
    pocketHD = new WalletPocketHD(rootKey, NBT, null, null);
    pocketHD.getReceiveAddress(); // Generate the first key
    signedMessage = new SignedMessage("BNvJUwg3BgkbQk5br1CxvHxdcDp1EC3saE", MESSAGE);
    pocketHD.signMessage(signedMessage, null);
    assertEquals(EXPECTED_NUBITS_SIG, signedMessage.getSignature());
    signedMessage = new SignedMessage("BNvJUwg3BgkbQk5br1CxvHxdcDp1EC3saE", MESSAGE_UNICODE);
    pocketHD.signMessage(signedMessage, null);
    assertEquals(EXPECTED_NUBITS_SIG_UNICODE, signedMessage.getSignature());
}