Fixed broken test + Added Unit and Integration Tests