@Test public void testWhenCertificateNotPresentThenRuleReturnsFailedStatus_Ok() throws Exception { Mockito.when(context.getCertificate(Mockito.any(byte[].class))).thenReturn(null); RuleResult result = rule.verify(context); Assert.assertEquals(result.getResultCode(), VerificationResultCode.NA); Assert.assertEquals(result.getErrorCode(), VerificationErrorCode.GEN_02); }
public VerificationErrorCode getErrorCode() { return VerificationErrorCode.GEN_02; }
CertificateExistenceRule extends BaseRule { public VerificationErrorCode getErrorCode() { return VerificationErrorCode.GEN_02; } }
CertificateExistenceRule extends BaseRule { public VerificationErrorCode getErrorCode() { return VerificationErrorCode.GEN_02; }  }
CertificateExistenceRule extends BaseRule { public VerificationErrorCode getErrorCode() { return VerificationErrorCode.GEN_02; }  VerificationResultCode verifySignature(VerificationContext context); VerificationErrorCode getErrorCode(); }
CertificateExistenceRule extends BaseRule { public VerificationErrorCode getErrorCode() { return VerificationErrorCode.GEN_02; }  VerificationResultCode verifySignature(VerificationContext context); VerificationErrorCode getErrorCode();  }