Convert integration tests back to unit tests