ExtendedSignatureCalendarChainAggregationTimeRule extends BaseRule { public VerificationErrorCode getErrorCode() { return VerificationErrorCode.CAL_03; }  VerificationResultCode verifySignature(VerificationContext context); VerificationErrorCode getErrorCode();  }
@Test public void testVerifyExtendedCalendarChainAggregationTimeDoesNotMatchWithInitialSignature_Ok() throws Exception { Mockito.when(mockedVerificationContext.getExtendedCalendarHashChain(Mockito.any(Date.class))).thenReturn(TestUtil.loadSignature(RFC3161_EXTENDED_FOR_PUBLICATIONS_FILE_VERIFICATION).getCalendarHashChain()); RuleResult result = rule.verify(mockedVerificationContext); Assert.assertEquals(result.getResultCode(), VerificationResultCode.FAIL); Assert.assertEquals(result.getErrorCode(), VerificationErrorCode.CAL_03); }