/**
* Test for <code>MacSpi</code> constructor
* Assertion: constructs MacSpi
*/
public void testMacSpiTests01() throws Exception {
MacSpi mSpi = new MyMacSpi();
byte [] bb1 = {(byte)1, (byte)2, (byte)3, (byte)4, (byte)5};
SecretKeySpec sks = new SecretKeySpec(bb1, "SHA1");
assertEquals("Incorrect MacLength", mSpi.engineGetMacLength(), 0);
try {
mSpi.engineInit(null, null);
fail("IllegalArgumentException must be thrown");
} catch (IllegalArgumentException e) {
}
mSpi.engineInit(sks, null);
byte[] bb = mSpi.engineDoFinal();
assertEquals(bb.length, 0);
try {
mSpi.clone();
fail("CloneNotSupportedException was not thrown as expected");
} catch (CloneNotSupportedException e) {
}
MacSpi mSpi1 = new MyMacSpi1();