Separated unit and integration tests.
Moved helper methods to own class.