I have such problem. I'm writing integration tests for my app. In the app I send some mails for the users. When I create email I use Velocity templates. Example of template:
Hi ${user}!
Example of mail:
Hi User!
When I write my integration tests I want to parse parameters from received emails. If I have velocity template and mail which was created with using of this template. I want such method
Map<String,String> getParameters(velocityTemplate, mailBody);
How I can parse parameters from emails text?