AggregationHashChainIndexConsistencyRule extends BaseRule { public VerificationErrorCode getErrorCode() { return VerificationErrorCode.INT_10; }  VerificationResultCode verifySignature(VerificationContext context); VerificationErrorCode getErrorCode();  }
@Test public void testSignatureWithInconsistentAggregationChainIndexReturnsFailedStatus_Ok() throws Exception { RuleResult result = rule.verify(build(TestUtil.loadSignature(SIGNATURE_AGGREGATION_HASH_CHAIN_INVALID_CHAIN_INDEX))); Assert.assertNotNull(result); Assert.assertEquals(result.getResultCode(), VerificationResultCode.FAIL); Assert.assertEquals(rule.getErrorCode(), VerificationErrorCode.INT_10); }
@Test public void testSignatureWithCorrectAggregationChainIndexReturnsOkStatus_Ok() throws Exception { RuleResult result = rule.verify(build(TestUtil.loadSignature(SIGNATURE_2017_03_14))); Assert.assertEquals(result.getResultCode(), VerificationResultCode.OK); Assert.assertNull(result.getErrorCode()); }