Adding tests for removing duplicate permissions.