...
You can define custom exceptions before running, even in Web Console at runtime. However, We don't encourage to create new classes in Web Console since that involves non-treatable inner-classes for Groovy Renderer and you will find it hard to deal with through Web Console.
...
To run a test, you can create a file holding the message above and throw it into the directory. However, Web Console can help to simplify your operations. Go to the endpoints page by directing your browser to: http://localhost:8080/endpoints and you can see the file://src/data?noop=true endpoint. Just open it and then select the Send to this endpoint link for inputing your message. Web Console will save your message as a file in the directory: src/data, and camel will process the message file then.