use of org.nhindirect.policy.PolicyRequiredException in project nhin-d by DirectProject.
the class SubjectKeyIdentifierExtensionField_injectReferenceValueTest method testInjectRefereneValue_keyIdDoesNotExist_required_assertException.
public void testInjectRefereneValue_keyIdDoesNotExist_required_assertException() throws Exception {
final X509Certificate cert = TestUtils.loadCertificate("cernerDemosCaCert.der");
final SubjectKeyIdentifierExtensionField field = new SubjectKeyIdentifierExtensionField(true);
boolean exceptionOccured = false;
try {
field.injectReferenceValue(cert);
} catch (PolicyRequiredException e) {
exceptionOccured = true;
}
assertTrue(exceptionOccured);
}
Aggregations