tests: big refactor