input: Write a function to replace all occurrences of a given character in a string with the provided replacement character. If the string is empty, return the empty string. Use the provided input to test the function. The function should be named `replace_all_occurrences`.
  
  
  def replace_all_occurrences(str, char, replacement):
      return str.replace(char, replacement)
  
  assert replace_all_occurrences("Hello World!", 'l', 'X') == "HeXXo WorXd!"
  assert replace_all_occurrences("Hello World!", 'o', 'Y') == "HellY WYrld!"
  assert replace_all_occurrences("", 'a', 'b') == ""
  assert replace_all_occurrences("Python is fun", 'n', 'z') == "Pythoz is fuz"
  
output: def replace_all_occurrences(str, char, replacement):
      return str.replace(char, replacement)