@Test public void testVerifyExtendedCalendarChainInputHashDoesNotMatchWithInitialSignature_Ok() throws Exception { Mockito.when(mockedVerificationContext.getExtendedCalendarHashChain(Mockito.any(Date.class))).thenReturn(TestUtil.loadSignature(Resources.RFC3161_EXTENDED_FOR_PUBLICATIONS_FILE_VERIFICATION).getCalendarHashChain()); RuleResult result = rule.verify(mockedVerificationContext); Assert.assertEquals(result.getResultCode(), VerificationResultCode.FAIL); Assert.assertEquals(result.getErrorCode(), VerificationErrorCode.PUB_03); Assert.assertNotNull(result.getErrorCode().getCode()); Assert.assertNotNull(result.getErrorCode().getMessage()); }
@Override VerificationErrorCode getErrorCode() { return VerificationErrorCode.PUB_03; }
PublicationsFileExtendedSignatureInputHashRule extends BaseRule { @Override VerificationErrorCode getErrorCode() { return VerificationErrorCode.PUB_03; } }
PublicationsFileExtendedSignatureInputHashRule extends BaseRule { @Override VerificationErrorCode getErrorCode() { return VerificationErrorCode.PUB_03; }  }
PublicationsFileExtendedSignatureInputHashRule extends BaseRule { @Override VerificationErrorCode getErrorCode() { return VerificationErrorCode.PUB_03; }   }
PublicationsFileExtendedSignatureInputHashRule extends BaseRule { @Override VerificationErrorCode getErrorCode() { return VerificationErrorCode.PUB_03; }    }