@Test
public void testEncryptPrivateKey() throws CipherException {

    String privKeyString = "7fe9d4b69f85c1fe15387a76e79d2b95c4c9e3fe756de3435afbc077d99d5346";
    ECKeyPair keyPair = ECKeyPair.create(Numeric.hexStringToByteArray(privKeyString));
    String password = "neo";
    // Used neo-core with address version 0x17 to generate the encrypted key.
    String expectedNep2Encrypted = "6PYLykbKcbwnCuTJiQQ5PYu5uH9NgwGYLoMyTUabRxRJUsiA9GP8NgorUV";
    Account a = new Account(keyPair);
    a.encryptPrivateKey(password);
    assertThat(a.getEncryptedPrivateKey(), is(expectedNep2Encrypted));
}