public void assignUsers( List<Object> usersToAssign ) {
    List<UIRepositoryObjectAcl> previousVal = new ArrayList<UIRepositoryObjectAcl>();
    previousVal.addAll( getSelectedUserList() );
    List<UIRepositoryObjectAcl> assignList = new ArrayList<UIRepositoryObjectAcl>();
    for ( Object user : usersToAssign ) {
      if ( user instanceof String )
        assignList.add( assignUser( (String) user ) );
    }
    this.firePropertyChange( "selectedUserList", null, getSelectedUserList() ); //$NON-NLS-1$
    setSelectedAssignedUsers( assignList );
    setSelectedAvailableUsers( new ArrayList<String>() );
  }
@Test
  public void testAssignUsers() {
    UIRepositoryObjectAcl selectedUserAcl = new UIRepositoryObjectAcl( createUserAce( USER1 ) );
    repositoryObjectAcls.addAcl( selectedUserAcl );
    repositoryObjectAclModel.setAclsList( defaultUserNameList, null );

    List<Object> objectUserList = Arrays.asList( new Object[] { USER2 } );
    repositoryObjectAclModel.assignUsers( objectUserList );
    assertStringListMatches( Arrays.asList( new String[] { USER3 } ), repositoryObjectAclModel.getAvailableUserList() );
    assertNameToAclListMatches( Arrays.asList( new String[] { USER2 } ), repositoryObjectAclModel
        .getSelectedAssignedUsers() );
    assertNameToAclListMatches( Arrays.asList( new String[] { USER2 } ), repositoryObjectAclModel.getAclsToAdd() );

    repositoryObjectAclModel.updateSelectedAcls();
    assertNameToAclListMatches( Arrays.asList( new String[] { USER1, USER2 } ), repositoryObjectAclModel
        .getSelectedAcls().getAcls() );
    // For some reason, updateSelectedAcls does not clear aclsToAdd. After the update USER2 is still present in
    // the aclsToAdd list. This probably is not an issue because the interface reloads. For now, I will clear
    // manually now so I can exercise some unassign code.
    repositoryObjectAclModel.getAclsToAdd().clear();

    // Unassign the pending USER2 and the pre-assigned USER1
    UIRepositoryObjectAcl user2Acl = repositoryObjectAclModel.getSelectedUser( 1 );
    repositoryObjectAclModel.unassign( Arrays.asList( new Object[] { user2Acl, selectedUserAcl } ) );

    assertEquals( 0, repositoryObjectAclModel.getSelectedAssignedUsers().size() );
    assertStringListMatches( defaultUserNameList, repositoryObjectAclModel.getAvailableUserList() );

    repositoryObjectAclModel.updateSelectedAcls();
    assertEquals( 0, repositoryObjectAclModel.getSelectedAcls().getAcls().size() );
  }