I think it's just too much overhead in trying to achieve this. Make your unit tests simple and easy. Create manually as much mock data as you need. Use the Unit Testing module from Mendix.
https://marketplace.mendix.com/link/component/390?_gl=1*ehiz2x*_gcl_au*MjAxODg2MDUyNi4xNzQ0MjgyOTQw
The Mendix Unit Testing module executes its unit tests within a transaction that is always rolled back upon completion.
When I have tests that need data, I create new entities at the start of the unit test microflow. This allows the microflow being tested to find the data it needs. The new entities are automatically cleaned up once the test has completed.
If there is common data you always need for testing, you can use the Setup and Teardown microflows to set this up for every test in a module.
You can find more information on the Unit Testing module in the documentation.
https://docs.mendix.com/appstore/modules/unit-testing/
I hope this helps. Good luck!