@Test
public void testHandlePeopleAssignments() {

	
	InternalTask task = (InternalTask) TaskModelProvider.getFactory().newTask();
	InternalTaskData taskData = (InternalTaskData) TaskModelProvider.getFactory().newTaskData();
	InternalPeopleAssignments peopleAssignment = peopleAssignmentHelper.getNullSafePeopleAssignments(task);
	assertNotNull(peopleAssignment);
	assertEquals(0, peopleAssignment.getPotentialOwners().size());
	assertEquals(0, peopleAssignment.getBusinessAdministrators().size());
	assertEquals(0, peopleAssignment.getTaskStakeholders().size());
	
	String actorId = "espiegelberg";
	String taskStakeholderId = "drmary";
	String businessAdministratorId = "drbug";
       String businessAdministratorGroupId = "Super users";
       String excludedOwnerId = "john";
       String recipientId = "mary";
	
	WorkItem workItem = new WorkItemImpl();		
	workItem.setParameter(PeopleAssignmentHelper.ACTOR_ID, actorId);
	workItem.setParameter(PeopleAssignmentHelper.TASKSTAKEHOLDER_ID, taskStakeholderId);
	workItem.setParameter(PeopleAssignmentHelper.BUSINESSADMINISTRATOR_ID, businessAdministratorId);
       workItem.setParameter(PeopleAssignmentHelper.BUSINESSADMINISTRATOR_GROUP_ID, businessAdministratorGroupId);
       workItem.setParameter(PeopleAssignmentHelper.EXCLUDED_OWNER_ID, excludedOwnerId);
       workItem.setParameter(PeopleAssignmentHelper.RECIPIENT_ID, recipientId);
	
	peopleAssignmentHelper.handlePeopleAssignments(workItem, task, taskData);
	
	List<OrganizationalEntity> potentialOwners = task.getPeopleAssignments().getPotentialOwners();
	assertEquals(1, potentialOwners.size());
	assertEquals(actorId, potentialOwners.get(0).getId());
	
	List<OrganizationalEntity> businessAdministrators = task.getPeopleAssignments().getBusinessAdministrators();
	assertEquals(4, businessAdministrators.size());
	assertEquals("Administrator", businessAdministrators.get(0).getId());
	// Admin group
	assertEquals("Administrators", businessAdministrators.get(1).getId());
	assertEquals(businessAdministratorId, businessAdministrators.get(2).getId());
       assertEquals(businessAdministratorGroupId, businessAdministrators.get(3).getId());
	
	
	List<OrganizationalEntity> taskStakehoders = ((InternalPeopleAssignments) task.getPeopleAssignments()).getTaskStakeholders();
	assertEquals(1, taskStakehoders.size());
	assertEquals(taskStakeholderId, taskStakehoders.get(0).getId());
       List<OrganizationalEntity> excludedOwners = ((InternalPeopleAssignments) task.getPeopleAssignments()).getExcludedOwners();
       assertEquals(1, excludedOwners.size());
       assertEquals(excludedOwnerId, excludedOwners.get(0).getId());
       List<OrganizationalEntity> recipients = ((InternalPeopleAssignments) task.getPeopleAssignments()).getRecipients();
       assertEquals(1, recipients.size());
       assertEquals(recipientId, recipients.get(0).getId());
	
}