starts rewrite of tests, marketplaces - apply

Completed!

#583