further refactoring of tests