{
ObjectName service = createRelationService("test:type=service", server);
RelationService rs = (RelationService) services.get(service);
createRelationTypeC(service);
createRolesC(server);
RoleResult result = null;
RelationSupport support = null;
support = new RelationSupport("id", service, server,
"relationTypeC", rolesC);
addRelation(server, service, support, "test:type=support");
result = rs.getRoles("id", new String[] {"roleC1", "roleC2" });
checkResult(result, roleInfosC, rolesC);
result = rs.getRoles("id", new String[] {"roleC1" });
RoleList resolved = result.getRoles();
assertEquals(1, resolved.size());
assertEquals(0, result.getRolesUnresolved().size());
compare(getRole(rolesC, "roleC1"), (Role) resolved.get(0));
result = rs.getRoles("id", new String[] {"roleC2" });
RoleUnresolvedList unresolved = result.getRolesUnresolved();
assertEquals(0, result.getRoles().size());
assertEquals(1, unresolved.size());
assertEquals("roleC2", ((RoleUnresolved)unresolved.get(0)).getRoleName());
}
finally
{