### Question:
EDKeyPair implements IKeyPair { @Override public byte[] signMessage(byte[] message) { try { EdDSAEngine sgr = new EdDSAEngine(MessageDigest.getInstance("SHA-512")); PrivateKey sKey = new EdDSAPrivateKey(keySpec); sgr.initSign(sKey); sgr.update(message); return sgr.sign(); } catch (Exception e) { throw new RuntimeException(e); } } EDKeyPair(EdDSAPrivateKeySpec keySpec); static EDKeyPair from256Seed(byte[] seedBytes); static EDKeyPair from128Seed(byte[] seedBytes); @Override String canonicalPubHex(); @Override BigInteger pub(); @Override String pubHex(); @Override String privHex(); @Override BigInteger priv(); @Override boolean verifySignature(byte[] message, byte[] sigBytes); @Override byte[] signMessage(byte[] message); @Override byte[] canonicalPubBytes(); @Override byte[] pub160Hash(); final EdDSAPrivateKeySpec keySpec; static final EdDSANamedCurveSpec ed25519; }### Answer:
@Test public void testSigning() { byte[] bytes = edKeyPair.signMessage(message); assertEquals(fixtures.getString("expected_sig"), B16.toString(bytes)); }