Unit and integration tests COMPLETE