### Question:
ClaimsAuthorizingInterceptor extends AbstractPhaseInterceptor<Message> { public void handleMessage(Message message) throws Fault { SecurityContext sc = message.get(SecurityContext.class); if (!(sc instanceof ClaimsSecurityContext)) { throw new AccessDeniedException("Security Context is unavailable or unrecognized"); } Method method = MessageUtils.getTargetMethod(message).orElseThrow(() -> new AccessDeniedException("Method is not available : Unauthorized")); if (authorize((ClaimsSecurityContext)sc, method)) { return; } throw new AccessDeniedException("Unauthorized"); } ClaimsAuthorizingInterceptor(); void handleMessage(Message message); void setClaims(Map<String, List<ClaimBean>> claimsMap); void setSecuredObject(Object object); void setNameAliases(Map<String, String> nameAliases); void setFormatAliases(Map<String, String> formatAliases);  }### Answer:
@Test public void testNonSAMLClaimDefaultNameAndFormat() throws Exception { org.apache.cxf.rt.security.claims.Claim claim1 = new org.apache.cxf.rt.security.claims.Claim(); claim1.setClaimType("role"); claim1.setValues(Arrays.asList("admin", "user")); org.apache.cxf.rt.security.claims.Claim claim2 = new org.apache.cxf.rt.security.claims.Claim(); claim2.setClaimType("http: claim2.setValues(Arrays.asList("password")); Message m = prepareMessage(TestService.class, "claimWithSpecificName", "role", claim1, claim2); interceptor.handleMessage(m); try { claim1.setValues(Arrays.asList("user")); m = prepareMessage(TestService.class, "claimWithSpecificName", "role", claim1, claim2); interceptor.handleMessage(m); fail("AccessDeniedException expected"); } catch (AccessDeniedException ex) { } }