Add integration tests for edge cases