• I usually use the below code before restore:

    alter database Test

    set offline with rollback immediate