WIP: reorganizing tests
WIP: refactor common logic in tests