Fix setting clipboard in tests