@Test
public void testSigningOneKeyWithMultipleMessages() throws Exception {

  Ed25519Sign.KeyPair keyPair = Ed25519Sign.KeyPair.newKeyPair();
  Ed25519Sign signer = new Ed25519Sign(keyPair.getPrivateKey());
  Ed25519Verify verifier = new Ed25519Verify(keyPair.getPublicKey());
  for (int i = 0; i < 100; i++) {
    byte[] msg = Random.randBytes(20);
    byte[] sig = signer.sign(msg);
    try {
      verifier.verify(sig, msg);
    } catch (GeneralSecurityException ex) {
      fail(
          String.format(
              "\n\nMessage: %s\nSignature: %s\nPrivateKey: %s\nPublicKey: %s\n",
              TestUtil.hexEncode(msg),
              TestUtil.hexEncode(sig),
              TestUtil.hexEncode(keyPair.getPrivateKey()),
              TestUtil.hexEncode(keyPair.getPublicKey())));
    }
  }
}