Refactored old tests into integration tests