Moving integration test to be a unit test