Added unit test for toString() method