Improved tests flows and added a test.