Refactor integratin tests