input: Write a python function to save and retrieve messages using Flask.
  assert save_message("Hello World!") == "Message saved successfully"
  assert retrieve_message() == "Hello World!"
  assert save_message("Another message") == "Message saved successfully"
  assert retrieve_message() == "Another message"
output: from flask import Flask, request, jsonify
  
  app = Flask(__name__)
  messages = []
  
  @app.route('/save_message', methods=['POST'])
  def save_message():
      message = request.json.get('message')
      if message:
          messages.clear()
          messages.append(message)
          return jsonify({'status': 'Message saved successfully'})
      return jsonify({'status': 'Failed to save message'}), 400
  
  @app.route('/retrieve_message', methods=['GET'])
  def retrieve_message():
      if messages:
          return jsonify({'message': messages[0]})
      return jsonify({'message': None}), 404
  
  # Function to simulate the API calls for testing
  def save_message(message):
      with app.test_client() as client:
          response = client.post('/save_message', json={'message': message})
          return response.json['status']
  
  def retrieve_message():
      with app.test_client() as client:
          response = client.get('/retrieve_message')
          return response.json['message']