moved creation of Testfactory from Ui to main