Imagine you have four MySQL database schemas across two environments:
foo
bar
You can override the settings you declare in the annotations using a orm.xml file. Configure maven or whatever you use to generate your deployable build artifacts to create that override file for the test environment.