Pardon if this sounds like one of those "Jaden Smith tweets"
Say when you go to sleep all your conscious activities cease. Many times you won't even know how much time has passed since you went to sleep.
Now if someone replaces your long term memory (i.e. the memory events up to the moment you went to sleep) with someone else's memory then what would happen when you wake up?
Would you panic thinking like you are the other person in someone else's body?
It's like replacing a computers hard disk with another one so when you boot up the desktop would look exactly the same as it was but your software should be able to notice changes in hardware.
In another example, if by some means you make a copy of your entire neural network in your brain into a computer simulation, then would that simulation think that it's you? Or would it have a different personality depending on which way the simulation goes?