@Test
public void testToString() throws Exception {

    ECKey key = ECKey.fromPrivate(BigInteger.TEN).decompress(); // An example private key.
    NetworkParameters params = MainNetParams.get();
    assertEquals("ECKey{pub HEX=04a0434d9e47f3c86235477c7b1ae6ae5d3442d49b1943c2b752a68e2a47e247c7893aba425419bc27a3b6c7e693a24c696f794c2ed877a1593cbee53b037368d7, isEncrypted=false, isPubKeyOnly=false}", key.toString());
    assertEquals("ECKey{pub HEX=04a0434d9e47f3c86235477c7b1ae6ae5d3442d49b1943c2b752a68e2a47e247c7893aba425419bc27a3b6c7e693a24c696f794c2ed877a1593cbee53b037368d7, priv HEX=000000000000000000000000000000000000000000000000000000000000000a, priv WIF=7qYrzJZWqnyCWMYswFcqaRJypGdVceudXPSxmZKsngN7h64GgGy, isEncrypted=false, isPubKeyOnly=false}", key.toStringWithPrivate(params));
}