In my experience if you select "restore to database Y" (test database) from a backup of database X (production database), it will overwrite the files of database Y, even though it says in the options menu that the "restore as" files are for database X. After proceeding with this, the Database X files had not been overwritten, only the files to Database Y.
I cannot make much sense of this, but i feel that i can safely assume that the selected "restore to" database is the only affected database during a restore from a file, no matter what it says under the options menu.