PublicKey { public static PublicKey fromHexString(String hex) { try { return new PublicKey(HexEncoder.getBytes(hex)); } catch (NumberFormatException e) { throw new RuntimeException(e); } } PublicKey(BigInteger integer);  PublicKey(byte[] bytes); static PublicKey fromHexString(String hex); byte[] getRaw(); String getHexString();  }
@Test(expected = RuntimeException.class) public void failure_GeneratePublicKey_wrong_input() { String hexString = "abcdefgg"; PublicKey.fromHexString(hexString); }