### Question:
AuthLevelCondition extends EntitlementConditionAdaptor { @Override public ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String, Set<String>> env) throws EntitlementException { if (subject == null) { return new ConditionDecision(false, Collections.<String, Set<String>>emptyMap()); } if (authLevel == null) { throw new EntitlementException(PROPERTY_VALUE_NOT_DEFINED, new String[]{AUTH_LEVEL}, null); } boolean allowed = false; Map<String, Set<String>> advices = new HashMap<String, Set<String>>(); if (debug.messageEnabled()) { debug.message(getConditionName() + ".getConditionDecision():entering"); } try { int maxRequestAuthLevel = getMaxRequestAuthLevel(env); if (maxRequestAuthLevel == Integer.MIN_VALUE) { SSOToken token = (SSOToken) subject.getPrivateCredentials().iterator().next(); maxRequestAuthLevel = getMaxRequestAuthLevel(token); } allowed = isAllowed(maxRequestAuthLevel, advices); if (debug.messageEnabled()) { debug.message("At " + getConditionName() + ".getConditionDecision():authLevel=" + authLevel + ",maxRequestAuthLevel=" + maxRequestAuthLevel + ",allowed = " + allowed); } } catch (SSOException e) { if (debug.messageEnabled()) { debug.message("Problem getting auth level from SSOToken: " + e.getMessage(), e); } } return new ConditionDecision(allowed, advices); } AuthLevelCondition();   AuthLevelCondition(Debug debug, CoreWrapper coreWrapper); @Override void setState(String state); @Override String getState(); @Override ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String, Set<String>> env); @Override String toString(); Integer getAuthLevel(); void setAuthLevel(Integer authLevel); @Override void validate(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test(expectedExceptions = EntitlementException.class) public void conditionShouldThrowEntitlementExceptionWhenEvaluatingWithNoAuthLevelSet() throws EntitlementException { String realm = "REALM"; Subject subject = new Subject(); String resourceName = "RESOURCE_NAME"; Map<String, Set<String>> env = new HashMap<String, Set<String>>(); condition.evaluate(realm, subject, resourceName, env); }