@Test
public void testAssignExcludedOwners() {

    String excludedOwnerId = "espiegelberg";
    Task task = TaskModelProvider.getFactory().newTask();
    InternalPeopleAssignments peopleAssignments = peopleAssignmentHelper.getNullSafePeopleAssignments(task);
    WorkItem workItem = new WorkItemImpl();
    workItem.setParameter(PeopleAssignmentHelper.EXCLUDED_OWNER_ID, excludedOwnerId);
    peopleAssignmentHelper.assignExcludedOwners(workItem, peopleAssignments);
    assertEquals(1, peopleAssignments.getExcludedOwners().size());
    OrganizationalEntity organizationalEntity1 = peopleAssignments.getExcludedOwners().get(0);
    assertTrue(organizationalEntity1 instanceof User);
    assertEquals(excludedOwnerId, organizationalEntity1.getId());
}