Refactored integration tests and added linking test