Added unit and integrational tests