### Question:
AMIdentityMembershipCondition extends EntitlementConditionAdaptor { @Override public ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String, Set<String>> env) throws EntitlementException { String subjectPrincipal = SubjectUtils.getPrincipalId(subject); if (debug.messageEnabled()) { debug.message("At AMIdentityMembershipCondition.evaluate(): entering, names:" + amIdentityName); debug.message("At AMIdentityMembershipCondition.evaluate(): subjectPrincipal:" + subjectPrincipal); } boolean isMember = false; if (subjectPrincipal != null && !subjectPrincipal.isEmpty()) { isMember = isMember(subjectPrincipal); } else { debug.message("At AMIdentityMembershipCondition.evaluate(): subjectPrincipal is null or empty"); } return new ConditionDecision(isMember, Collections.<String, Set<String>>emptyMap()); } AMIdentityMembershipCondition();   AMIdentityMembershipCondition(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(); Set<String> getAmIdentityName(); void setAmIdentityNames(Set<String> nameValues); @Override void validate(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void conditionShouldEvaluateToFalseWhenNoIdentitiesConfigured() throws EntitlementException { String realm = "REALM"; Subject subject = new Subject(); String resourceName = "RESOURCE_NAME"; Map<String, Set<String>> env = new HashMap<String, Set<String>>(); subject.getPrincipals().add(new AuthSPrincipal("INVOCATOR_UUID")); ConditionDecision decision = condition.evaluate(realm, subject, resourceName, env); assertThat(decision.isSatisfied()).isFalse(); assertThat(decision.getAdvice()).isEmpty(); }