Added unit tests to cover key functionalities. These tests help ensure that future changes do not break existing behavior.