### Question:
WebSSOProfileConsumerImpl extends AbstractProfileBase implements WebSSOProfileConsumer { protected void verifyAuthnContext(RequestedAuthnContext requestedAuthnContext, AuthnContext receivedContext, SAMLMessageContext context) throws InsufficientAuthenticationException { if (requestedAuthnContext != null && AuthnContextComparisonTypeEnumeration.EXACT.equals(requestedAuthnContext.getComparison())) { String classRef = null, declRef = null; if (receivedContext.getAuthnContextClassRef() != null) { classRef = receivedContext.getAuthnContextClassRef().getAuthnContextClassRef(); } if (requestedAuthnContext.getAuthnContextClassRefs() != null) { for (AuthnContextClassRef classRefRequested : requestedAuthnContext.getAuthnContextClassRefs()) { if (classRefRequested.getAuthnContextClassRef().equals(classRef)) { return; } } } if (receivedContext.getAuthnContextDeclRef() != null) { declRef = receivedContext.getAuthnContextDeclRef().getAuthnContextDeclRef(); } if (requestedAuthnContext.getAuthnContextDeclRefs() != null) { for (AuthnContextDeclRef declRefRequested : requestedAuthnContext.getAuthnContextDeclRefs()) { if (declRefRequested.getAuthnContextDeclRef().equals(declRef)) { return; } } } throw new InsufficientAuthenticationException("Response doesn't contain any of the requested authentication context class or declaration references"); } } WebSSOProfileConsumerImpl();  WebSSOProfileConsumerImpl(SAMLProcessor processor, MetadataManager manager); SAMLCredential processAuthenticationResponse(SAMLMessageContext context, SAMLMessageStorage protocolCache); int getMaxAuthenticationAge(); void setMaxAuthenticationAge(int maxAuthenticationAge);  }### Answer:
@Test public void testAuthnExactComparison() throws Exception { RequestedAuthnContext requestedAuthnContext = helper.getRequestedAuthnContext(AuthnContextComparisonTypeEnumeration.EXACT, Arrays.asList("test", "test2")); AuthnContext authnContext = helper.getAuthnContext(helper.getClassRef("test2"), null); profile.verifyAuthnContext(requestedAuthnContext, authnContext, null); }
@Test(expected = InsufficientAuthenticationException.class) public void testAuthnExactComparison_none() throws Exception { RequestedAuthnContext requestedAuthnContext = helper.getRequestedAuthnContext(AuthnContextComparisonTypeEnumeration.EXACT, Arrays.asList("test", "test2")); AuthnContext authnContext = helper.getAuthnContext(helper.getClassRef("test5"), null); profile.verifyAuthnContext(requestedAuthnContext, authnContext, null); }