Added unit tests