public void testInferredAttributes() throws Exception {
root = loadAndInfer(LoginHandlerInstance.class);
Session session = assertHasSession(root, "my session");
DomainIterator iterator = assertHasDomainIterator(session, "logged in user");
DomainInstance instance = iterator.getCurrentInstance();
assertNotGenerated(instance);
// the domain instance should contain all attributes
DomainAttributeInstance apassword = assertHasDomainAttributeInstance(instance, "password");
assertGenerated(apassword);
DomainAttributeInstance aname = assertHasDomainAttributeInstance(instance, "name");
assertNotGenerated(aname);
// the instance should also contain an 'empty' PrimitiveCondition
BuiltinProperty exists = (BuiltinProperty) iterator.getEmpty();
assertGenerated(exists);
}