public void clear() {
    aclsToAdd.clear();
    aclsToRemove.clear();
    masterAvailableRoleList.clear();
    masterAvailableUserList.clear();
    availableRoleList.clear();
    availableUserList.clear();
    selectedAvailableRoles.clear();
    selectedAvailableUsers.clear();
    selectedAssignedRoles.clear();
    selectedAssignedUsers.clear();
    setRoleAssignmentPossible( false );
    setRoleUnassignmentPossible( false );
    setUserAssignmentPossible( false );
    setUserUnassignmentPossible( false );
  }
@Test
  public void testClear() {
    repositoryObjectAcls.addAcl( new UIRepositoryObjectAcl( createUserAce( USER1 ) ) );
    repositoryObjectAcls.addAcl( new UIRepositoryObjectAcl( createRoleAce( ROLE1 ) ) );
    repositoryObjectAclModel.setAclsList( defaultUserNameList, defaultRoleNameList );
    repositoryObjectAclModel.assignRoles( Arrays.asList( new Object[] { ROLE2 } ) );
    repositoryObjectAclModel.assignUsers( Arrays.asList( new Object[] { USER2 } ) );

    repositoryObjectAclModel.clear();
    assertEquals( 0, repositoryObjectAclModel.getAvailableUserList().size() );
    assertEquals( 0, repositoryObjectAclModel.getAvailableRoleList().size() );
    assertEquals( 0, repositoryObjectAclModel.getSelectedAssignedUsers().size() );
    assertEquals( 0, repositoryObjectAclModel.getSelectedAssignedRoles().size() );
    assertEquals( 0, repositoryObjectAclModel.getSelectedAvailableUsers().size() );
    assertEquals( 0, repositoryObjectAclModel.getSelectedAvailableRoles().size() );
    // Selected List is unchanged.
    assertEquals( 1, repositoryObjectAclModel.getSelectedUserList().size() );
    assertEquals( 1, repositoryObjectAclModel.getSelectedRoleList().size() );
  }