### Question:
Sign { public static SignatureData signMessage(byte[] message, ECKeyPair keyPair) { return signMessage(message, keyPair, true); }  static SignatureData signMessage(byte[] message, ECKeyPair keyPair); static SignatureData signMessage(byte[] message, ECKeyPair keyPair, boolean needToHash); static BigInteger recoverFromSignature(int recId, ECDSASignature sig, byte[] message); static BigInteger signedMessageToKey(
            byte[] message, SignatureData signatureData); static BigInteger publicKeyFromPrivate(BigInteger privKey);  }### Answer:
@Test public void testSignMessage() { Sign.SignatureData signatureData = Sign.signMessage(TEST_MESSAGE, SampleKeys.KEY_PAIR); Sign.SignatureData expected = new Sign.SignatureData( (byte) 27, Numeric.hexStringToByteArray( "0x9631f6d21dec448a213585a4a41a28ef3d4337548aa34734478b563036163786"), Numeric.hexStringToByteArray( "0x2ff816ee6bbb82719e983ecd8a33a4b45d32a4b58377ef1381163d75eedc900b") ); assertThat(signatureData, is(expected)); }
@Test @Ignore public void testSignMessage() { Sign.SignatureData signatureData = Sign.signMessage(TEST_MESSAGE, SampleKeys.KEY_PAIR); Sign.SignatureData expected = new Sign.SignatureData( (byte) 27, Numeric.hexStringToByteArray( "0x9631f6d21dec448a213585a4a41a28ef3d4337548aa34734478b563036163786"), Numeric.hexStringToByteArray( "0x2ff816ee6bbb82719e983ecd8a33a4b45d32a4b58377ef1381163d75eedc900b") ); assertThat(signatureData, is(expected)); }