Added test for toString.

Related to issue #84.