refactoring unit- and e2e-tests