Unit and integration tests fixed