[test] Refactor some integration tests