When you restore a database from backup to your SQL server in test environment, you will try to add Role to a restored database for user. At this time you may get the error message:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo). User, group or role 'UserName' already exists in the current database. (Microsoft SQL Server Error" 15023). (read more...)