@Test
public void testGeneratePrivateKeyFromString() {

    String seed = "Lorem ipsum dolor sit amet, ei quo equidem perpetua efficiendi";
    PrivateKey privKey = new PrivateKey(seed);
    System.out.println(Util.byteArrayToHexString(privKey.getValue()));
    System.out.println(Util.byteArrayToHexString(new PublicKey(privKey).getValue()));
    ECCryptoService ecCryptoService = AppServiceProvider.getECCryptoService();
    // validate against checked pair
    TestCase.assertEquals(
            "00948c6246ebb299414ccd3cc8b17674d3f6fe0d14b984b6c2c84e0d5866a38da2",
            Util.byteArrayToHexString(privKey.getValue()));
    // check the random number is within expected range 0 < privateKey < n
    TestCase.assertEquals(1, new BigInteger(1, privKey.getValue()).compareTo(BigInteger.ZERO));
    TestCase.assertEquals(-1, new BigInteger(1, privKey.getValue()).compareTo(ecCryptoService.getN()));
}