Preparing for integration tests
Added functional tests