* @param expectedPrincipalName - the expected principal name
* @param expectedAffilCode TODO
* @return the entity name for further tests
*/
public EntityNameContract testCreatePrincipal(String expectedPrincipalName, String expectedAffilCode) {
Principal principal = idSvc.getPrincipalByPrincipalName(expectedPrincipalName);
assertNotNull("principal should have been created", principal);
Person person = KimApiServiceLocator.getPersonService().getPersonByPrincipalName(expectedPrincipalName);
assertNotNull("person should have been created", person);
EntityDefault entity = idSvc.getEntityDefault(principal.getEntityId());
assertNotNull("entity should have been created", entity);
Map<String, String> criteria = new HashMap<String, String>();
criteria.put("entityId", entity.getEntityId());
Collection<EntityAffiliationBo> results = getBoSvc().findMatching(EntityAffiliationBo.class, criteria);