ExtendingPermittedVerificationRule extends BaseRule { public VerificationErrorCode getErrorCode() { return VerificationErrorCode.GEN_02; }  VerificationResultCode verifySignature(VerificationContext context); VerificationErrorCode getErrorCode();  }
@Test public void testExtendingIsNotAllowed_Ok() throws Exception { Mockito.when(context.isExtendingAllowed()).thenReturn(false); RuleResult result = rule.verify(context); Assert.assertEquals(result.getResultCode(), VerificationResultCode.NA); Assert.assertEquals(result.getErrorCode(), VerificationErrorCode.GEN_02); }