/*
* Class under test for int sign(byte[], int, int)
*/
public void testSignbyteArrayintint() throws Exception {
MySignature1 s = new MySignature1("ABC");
byte[] b = new byte[8];
try {
s.sign(b, 0, 5);
fail("No expected SignatureException 1");
} catch (SignatureException e) {
}
s.initVerify(new MyPublicKey());
try {
s.sign(b, 0, 5);
fail("No expected SignatureException 1");
} catch (SignatureException e) {
}
s.initSign(new MyPrivateKey());
s.sign(b, 0, 5);
assertEquals("state", Signature.SIGN, s.getState());
assertTrue("sign() failed", s.runEngineSign);
}