Map<String, String> criteria = new HashMap<String, String>();
criteria.put("entityId", entity.getEntityId());
Collection<EntityAffiliationBo> results = getBoSvc().findMatching(EntityAffiliationBo.class, criteria);
assertEquals("number of affiliations differ", 1, results.size());
EntityAffiliationBo affilBo = results.iterator().next();
assertNotNull("affiliation type code should not be null", affilBo.getAffiliationTypeCode());
assertEquals("affiliation code differs", expectedAffilCode, affilBo.getAffiliationTypeCode());
assertTrue("affiliation should be active", affilBo.isActive());
assertTrue("affiliation should be the default", affilBo.isDefaultValue());
Collection<EntityNameBo> names = getBoSvc().findMatching(EntityNameBo.class, criteria);
assertEquals("number of names differ", 1, names.size());
final EntityNameBo entityName = names.iterator().next();