String issuerdn = cert.getIssuerDN().toString();
String serno = cert.getSerialNumber().toString(16);
ejbcaraws.revokeCert(issuerdn, serno, RevokedCertInfo.REVOCATION_REASON_CERTIFICATEHOLD);
RevokeStatus revokestatus = ejbcaraws.checkRevokationStatus(issuerdn, serno);
assertNotNull(revokestatus);
assertTrue(revokestatus.getReason() == RevokedCertInfo.REVOCATION_REASON_CERTIFICATEHOLD);
assertTrue(revokestatus.getCertificateSN().equals(serno));
assertTrue(revokestatus.getIssuerDN().equals(issuerdn));
assertNotNull(revokestatus.getRevocationDate());
ejbcaraws.revokeCert(issuerdn, serno, RevokedCertInfo.NOT_REVOKED);
revokestatus = ejbcaraws.checkRevokationStatus(issuerdn, serno);
assertNotNull(revokestatus);
assertTrue(revokestatus.getReason() == RevokedCertInfo.NOT_REVOKED);
ejbcaraws.revokeCert(issuerdn, serno, RevokedCertInfo.REVOCATION_REASON_KEYCOMPROMISE);
revokestatus = ejbcaraws.checkRevokationStatus(issuerdn, serno);
assertNotNull(revokestatus);
assertTrue(revokestatus.getReason() == RevokedCertInfo.REVOCATION_REASON_KEYCOMPROMISE);
try {
ejbcaraws.revokeCert(issuerdn, serno, RevokedCertInfo.NOT_REVOKED);
assertTrue(false);
}catch(AlreadyRevokedException_Exception e){}