feat: added some unit and end2end tests