InvalidKeyException, IllegalStateException {
if (!DEFSupported) {
fail(NotSupportMsg);
return;
}
KeyAgreementSpi spi = new MyKeyAgreementSpi();
KeyAgreement keyA = new myKeyAgreement(spi, defaultProvider,
defaultAlgorithm);
assertEquals("Incorrect algorithm", keyA.getAlgorithm(),
defaultAlgorithm);
assertEquals("Incorrect provider", keyA.getProvider(), defaultProvider);