input: Write a python function to initialize a Flask application with a User class and create routes for handling GET and POST requests.
  assert isinstance(app, Flask)
  assert hasattr(User, '__init__')
  assert hasattr(app, 'route')
output: from flask import Flask, request, jsonify
  
  app = Flask(__name__)
  
  class User:
      def __init__(self, username, email):
          self.username = username
          self.email = email
  
  @app.route('/user', methods=['GET', 'POST'])
  def handle_user():
      if request.method == 'GET':
          return jsonify({"message": "GET request received"})
      elif request.method == 'POST':
          data = request.get_json()
          new_user = User(username=data['username'], email=data['email'])
          return jsonify({"message": "User created", "username": new_user.username, "email": new_user.email})
  
  if __name__ == '__main__':
      app.run(debug=True)