Moved code to integration tests.