Tests the file replacement.