Fixed unit tests. Starting integration tests